feat: Add --expect captured-variable assertions to await-pause-point#1894
Merged
hatayama merged 2 commits intoJul 20, 2026
Merged
Conversation
Callers currently have to eyeball CapturedVariables JSON to check a value at a hit. --expect 'Name=value' (repeatable, on both await-pause-point and enable-pause-point --await) has the CLI do that comparison instead: it looks up Name across Local/Parameter/ InstanceField/This entries, compares the serialized value with string equality (splitting only on the first "=" so an expected value containing "=" still round-trips), and adds an Expectations array plus AllExpectationsPassed to the hit response. Evaluation runs against the raw CapturedVariables before --captured-variable- names/--captured-variables can narrow or strip them, so an --expect target is never dropped just because it wasn't also requested through those flags. Exit code is unchanged; the pass/fail signal is JSON-only.
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughChangesThe pause-point CLI now supports repeatable Pause-point expectation assertions
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant PausePointWait
participant StatusQuery
participant ExpectationEvaluator
participant LogFetcher
CLI->>PausePointWait: await pause point with --expect
PausePointWait->>StatusQuery: query hit state
StatusQuery-->>PausePointWait: captured variables
PausePointWait->>ExpectationEvaluator: evaluate expectations
ExpectationEvaluator-->>PausePointWait: results and all-passed status
PausePointWait->>LogFetcher: fetch matching logs
LogFetcher-->>PausePointWait: logs or fetch error
PausePointWait-->>CLI: JSON response
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
The --expect bullet sat right after two bullets that explicitly name their commands, so it read as if pause-point-status also accepted --expect. It does not: passing it there hits the outdated-runner-hint Unknown option error and misleadingly suggests the CLI is stale.
hatayama
merged commit Jul 20, 2026
152a788
into
feature/pause-point-round4-integration
1 check was pending
This was referenced Jul 21, 2026
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
await-pause-point(andenable-pause-point --await) now accept a repeatable--expect 'Name=value'option that has the CLI check a captured variable's value for you.User Impact
CapturedVariablesfrom the JSON response yourself and comparing it by eye.--expect 'Health=100'(repeatable for multiple assertions), the hit response now includes anExpectationsarray (Name,Expected,Actual,Passed,Found) and an overallAllExpectationsPassedflag, so the pass/fail read is immediate instead of manual.--expectwas passed, the response is unchanged — no new fields appear.Changes
Nameacross every captured-variable kind (Local,Parameter,InstanceField,This); a name that isn't found reportsFound: false, Passed: falseinstead of erroring.=(for example a connection string) is preserved: the CLI splits only on the first=.--captured-variable-names/--captured-variables=namescan narrow or strip them, so an--expecttarget is never silently dropped just because it wasn't also requested through those flags.await-pause-pointcommand andenable-pause-point --await.AllExpectationsPassed), so scripts checking exit codes are unaffected.Verification
scripts/check-go-cli.sh: all packages pass (fmt/vet/lint/test/build)--expectvalue parsing (valid, and a value with no=rejected), an inner-=value split correctly, expectation evaluation against captured variables (match/mismatch/name-not-found), and end-to-end hit responses throughawait-pause-point(with and without--expect) andenable-pause-point --await, plus a repeatable-flag extraction test and a--expect-without---awaitrejection testenable-pause-point --await --expect ...without--awaitcorrectly rejected withINVALID_ARGUMENT; an expired marker with--await --expectcorrectly reportsPAUSE_POINT_EXPIREDwithCommand: enable-pause-pointuloop skills install --claude --agents: regenerated copies verified byte-identical to source