Skip to content

chore(test): expect the lease-id refusal when shutdown omits the lease id - #4941

Merged
thymikee merged 1 commit into
0.22from
fix/0.22-shutdown-lease-test
Nov 22, 2026
Merged

thymikee merged 1 commit into
0.22from
fix/0.22-shutdown-lease-test

Conversation

@thymikee

@thymikee thymikee commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Summary

#4911 and #4917 merged into 0.22 35 seconds apart. #4911 refuses any request to a leased session that omits its lease id with UNAUTHORIZED / LEASE_SESSION_MISMATCH, before any handler runs. #4917 added a shutdown test whose "omitting" case still expected a DEVICE_IN_USE response. That case now throws, so Coverage fails on 0.22 (f409db1) and on every PR against it.

The omitting case now expects the #4911 refusal and checks it does not name the session. The sending case is unchanged.

Validation


Show it working
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.08 MB 6.08 MB 0 B
Package (unpacked) 6.08 MB 6.08 MB 0 B
Package (download) 1.86 MB 1.86 MB -23 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 21.0 ms 22.0 ms +1.0 ms
CLI --help 43.9 ms 43.4 ms -0.5 ms

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 0aa996b

No open findings.

1 finding below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (b03e32bf7a36).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at 0aa996b. It updates one test file to expect the lease-id refusal when shutdown omits the lease id, and it touches no production path. No conflicts are known. The only failing checks are Body rules, which show as cancelled, so they look unrelated to this diff. Not verified here: the vitest file was not run, so the 7-passed claim is the author's. Not blocking: PR #4943 edits the same test file to fix the same 0.22 break, so the two PRs conflict and only one can merge; #4941 is the smaller diff. The second rejects.not.toMatchObject({details:{session}}) assertion cannot fail on this route, and the if (!leaseId) return inside the shared loop makes the test two tests in one body. Asserting details.field === 'leaseId' or splitting the omitting case would tighten it, and both can be taken or left. Before merge, decide between #4941 and #4943, merge one, and close the other.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 22, 2026
@thymikee
thymikee merged commit 64f963a into 0.22 Nov 22, 2026
16 of 18 checks passed
@thymikee
thymikee deleted the fix/0.22-shutdown-lease-test branch November 22, 2026 08:17
@thymikee

Copy link
Copy Markdown
Member Author

Cleanup after merge: the local and remote branch fix/0.22-shutdown-lease-test are removed, and the temporary PR body files are removed. The change was made in the coordinator checkout, which is back on 0.22. No worktree, T3 device, daemon or session was opened for this PR.

hannojg pushed a commit to hannojg/agent-device that referenced this pull request Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant