Skip to content

test(gateway): expect a revoked person's Goal retry to be hidden as not found - #205698

Merged
vincentkoc merged 1 commit into
mainfrom
test/goal-revoked-retry-not-found
Nov 26, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
test/goal-revoked-retry-not-found

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

src/gateway/chat-goal-created-authority.e2e.test.ts fails on main in the revoked-role scenario of "finishes started Goal returns after role loss, refuses the next start, and honors Stop":

Expected: "missing scope: operator.write"
Received: "Session "agent:main:dashboard:<id>" was not found."

It turns checks-node-changed red on every PR whose changed-test selection includes it. For example, #205482 changes only src/agents/subagents and fails this check.

User Impact

None. Test-only change. The product already refuses the revoked person's retry, starts no work and sends no reply. Only the error text the test expected is different.

Why This Change Was Made

#204899 made chat.send from a personal profile that holds operator.sessions.read a session-participation request (requiresSessionParticipation in method-scopes.ts, deferred in method-authorization.ts). The participation check refuses a session the person can no longer join with hiddenSessionNotFound, so it does not reveal that the session exists. Before #204899 the same request stopped at the scope gate with missing scope: operator.write. The test still expected that older refusal.

The test now expects the hidden not-found refusal for the exact session key. The checks after it are unchanged and pass: the Gateway drains, the parent makes no new provider call (parentCalls stays 5), and the child call count is unchanged.

Evidence

  • node scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts src/gateway/chat-goal-created-authority.e2e.test.ts: fails before this change with the error above and passes after it (1/1).
  • oxfmt --check clean.
  • A direct push to main was refused by the repository ruleset ("Changes must be made through a pull request"), so this repair is a PR.

…ot found

#204899 routes chat.send from a session-read personal profile through session
participation, which refuses a session the person can no longer join with the
hidden not-found error instead of a missing operator.write scope. The test
still expected the scope refusal and failed on main.
@vincentkoc vincentkoc self-assigned this Nov 26, 2026
@clawsweeper

clawsweeper Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Nov 26, 2026
@clawsweeper clawsweeper Bot added the P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. label Nov 26, 2026
@vincentkoc
vincentkoc merged commit b1db40c into main Nov 26, 2026
103 checks passed
@vincentkoc
vincentkoc deleted the test/goal-revoked-retry-not-found branch November 26, 2026 02:26
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Nov 26, 2026
…irement-rule

* origin/main: (172 commits)
  test(gateway): expect a revoked person's Goal retry to be hidden as not found (#205698)
  fix: keep browser disabled when only hardening relay authentication (#203137)
  fix: recover Linux stream automations after command-anchor crashes (#203149)
  fix(whatsapp): identify voice-note captions as text in delivery receipts (#205381)
  fix(test): unblock restart-auth plugin and worker publication qualification (#205679)
  chore(ui): refresh control ui locales (#205691)
  fix: reduce memory during SQLite usage refresh (#201064)
  fix(plugins): readmit native captures with a dangling host link
  chore(i18n): refresh native locales (#205680)
  fix(update): hash SQLite lock bytes as zeros so Windows exclusion cannot fail verification (#205668)
  fix(skill-workshop): skip the skill diet for skills with Markdown outside support directories (#204881)
  fix(plugins): clarify dated SDK migration notices (#200932)
  fix: keep the resident launcher when reinstalling Gateway (#205655)
  fix: show the whole reply when you reopen a TUI session (#200455)
  test(ui): wait for restored speech player authorization (#199502)
  feat: let agents post approved GitHub comments (#204301)
  fix(agents): honor imageMaxDimensionPx at the provider and CLI image handoffs (#205663)
  chore(ui): refresh control ui locales (#205664)
  fix(google): preserve playback when Google Live splits audio into parts (#205364)
  fix: show named characters in exported session messages (#205362)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 26, 2026
…ot found (openclaw#205698)

openclaw#204899 routes chat.send from a session-read personal profile through session
participation, which refuses a session the person can no longer join with the
hidden not-found error instead of a missing operator.write scope. The test
still expected the scope refusal and failed on main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant