feat(debugger,server): typed step-mode parsing, token policy, real timeline pause reasons (#1262, #1263, #1264)#1349
Merged
Timi16 merged 2 commits intoMay 28, 2026
Conversation
…meline pause reasons (Timi16#1262, Timi16#1263, Timi16#1264) closes Timi16#1262 closes Timi16#1263 closes Timi16#1264 Timi16#1263 — step-mode parsing is now a single typed function (parse_step_mode -> Result<StepMode>) used by both the run and staged flows. Unsupported modes return a clear error ("unsupported step mode '<x>'. Supported: into, over, out, block.") instead of silently defaulting to StepInto; common aliases (i/o/u/b) are accepted. Tests cover supported modes, aliases, and the error path. Timi16#1262 — token-strength policy is now enforceable. New --require-strong-token flag on the server: a token shorter than 16 chars warns by default, or is rejected at startup when the flag is set. Recommended length documented in the flag help (≥16, ideally a random 32-byte token). Logic extracted into a testable evaluate_token_policy() with tests for missing / short / acceptable tokens under both modes. (server man page regenerated for the new flag.) Timi16#1264 — exported timeline pause points now carry the *actual* classified pause reason (breakpoint / step_boundary / panic / end_of_execution / user_interrupt) read from engine state, instead of a hardcoded "breakpoint". The reason field is already serialized in the timeline JSON and remains a plain string, so existing consumers stay tolerant. Verified: cargo build --all-targets clean; new step_and_token_tests pass (5/5); timeline/library tests unaffected. Note: Timi16#1258 (request ids in CLI-visible remote errors) is a larger change — plumbing the protocol message id through the remote error types — and is left as a focused follow-up rather than bundled here. Co-Authored-By: Claude <noreply@anthropic.com>
|
@chinelo002 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…16#1258) Server-side error responses now carry the client's per-connection request id ("… (request #N)"), so a CLI failure can be correlated with the matching server log line. Applied centrally in send_request_once via a small, testable tag_error_with_request_id helper, so every command's remote-error surface gets the id without per-call-site changes. The id is the request counter (not an internal server identifier) and is appended only when not already present. Tests (request_id_tests): id appended to error responses, not duplicated on re-tag, and non-error responses untouched. Completes the batch — this PR now closes Timi16#1258, Timi16#1262, Timi16#1263, Timi16#1264. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
closes #1262
closes #1263
closes #1264
#1263 — typed step-mode parsing
parse_step_modeis now the single source of truth (-> Result<StepMode>) for both the run and staged flows. Unsupported modes return a clear error instead of silently defaulting toStepInto; aliasesi/o/u/bare accepted. Tested (supported, aliases, error path).#1262 — enforceable token policy
New
--require-strong-tokenflag on the server: a token shorter than 16 chars warns by default, or is rejected at startup when the flag is set. Recommended length is documented in the flag help (≥16, ideally a random 32-byte token). Policy extracted into a testableevaluate_token_policy()with tests for missing / short / acceptable tokens in both modes. Server man page regenerated for the new flag.#1264 — real pause reasons in exported timeline
Exported timeline pause points now carry the actual classified reason (
breakpoint/step_boundary/panic/end_of_execution/user_interrupt) read from engine state, instead of a hardcoded"breakpoint". Thereasonfield is already serialized and stays a plain string, so existing consumers remain tolerant of the value.Test plan
cargo build --all-targetsclean.step_and_token_testspass (5/5); timeline/library tests unaffected.Out of scope (follow-up)
--noplot/lib-bench config bug onmain); unrelated to this change.closes #1258