Skip to content

RT-184 (rt half): gate option descriptions and per-question context - #299

Merged
m4ttheweric merged 7 commits into
mainfrom
opt-desc-rt
Sep 16, 2026
Merged

m4ttheweric merged 7 commits into
mainfrom
opt-desc-rt

Conversation

@m4ttheweric

@m4ttheweric m4ttheweric commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator
  • rt-client: gate options carry an optional description through normalization; GateQuestion carries an optional per-question context.
  • gate:open/gate:ask accept option descriptions and per-question context. The per-question context shares gate:ask's existing 8192-byte context budget with the gate-level context (dropped first if the shared budget overflows). Option descriptions are NOT in that budget: each is separately capped at 1024 bytes per field, with no cap on option or question count.
  • rt gate ask/list pin option descriptions and per-question context as verbatim passthrough.
  • mcp gate_ask documents option description and per-question context in the input schema.
  • e2e: gate ask round-trips option descriptions and question context into list --json.
  • Fix (post-review): gate:ask's human-owned MISSING_CONTEXT guard exempted whenever contextOmitted was true, but contextOmitted also covers "only question contexts overflowed the shared budget" (this PR's addition). A human-owned, non-exempt-kind gate with no gate context and oversized question contexts opened with no material anywhere instead of being refused. Fixed to exempt the guard only when the gate context itself was dropped. Caught by an adversarial review with a live probe against the PR head (contextOmitted: true, context: null, ok: true where it should have refused); RED/GREEN test added to gate-ask-handler.test.ts.
  • rt half of RT-184; the board/console half shipped separately in board-36.

🤖 Generated with Claude Code

m4ttheweric and others added 6 commits September 16, 2026 15:34
…zation

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…xt under one context budget

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…batim passthrough

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… the input schema

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…to list --json

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 80 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: a51594da-3934-45d1-b0cd-738dbbccf758

📥 Commits

Reviewing files that changed from the base of the PR and between 6348cb7 and aca07f7.

📒 Files selected for processing (12)
  • commands/__tests__/gate-ask-cli.test.ts
  • commands/__tests__/gate.test.ts
  • commands/gate.ts
  • e2e/tests/gate-ask-cli.test.ts
  • lib/daemon/__tests__/gate-ask-handler.test.ts
  • lib/daemon/__tests__/gates-handlers.test.ts
  • lib/daemon/handlers/gate.ts
  • lib/mcp/__tests__/tools.test.ts
  • lib/mcp/tools.ts
  • packages/rt-client/src/commands.ts
  • packages/rt-client/src/gate-options.ts
  • packages/rt-client/test/gate-options.test.ts

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

…ped gate context

contextOmitted covers two different drops: the gate context itself over
budget, or only the question contexts pushing the shared budget over (RT-184).
The guard exempted on either, so a human-owned, non-exempt-kind gate with
no gate context and oversized question contexts opened with no material
anywhere instead of being refused. Only a dropped gate context now exempts
the guard.

RED: a new case in gate-ask-handler.test.ts (no gate context, non-exempt
kind, question contexts alone over budget) failed before this change,
matching a live probe against the PR head (contextOmitted: true, context:
null, ok: true where it should have been refused).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@m4ttheweric
m4ttheweric merged commit c5fbf4f into main Sep 16, 2026
4 checks passed
@m4ttheweric
m4ttheweric deleted the opt-desc-rt branch September 16, 2026 21:14
m4ttheweric added a commit that referenced this pull request Sep 17, 2026
…299)

* rt-client: gate options carry an optional description through normalization

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* rt-client: GateQuestion carries an optional per-question context

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* gate:open/gate:ask: accept option descriptions and per-question context under one context budget

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* rt gate ask/list: pin option descriptions and question context as verbatim passthrough

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* mcp gate_ask: document option description and per-question context in the input schema

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* e2e: gate ask round-trips option descriptions and question context into list --json

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* gate:ask: exempt the human-owned MISSING_CONTEXT guard only on a dropped gate context

contextOmitted covers two different drops: the gate context itself over
budget, or only the question contexts pushing the shared budget over (RT-184).
The guard exempted on either, so a human-owned, non-exempt-kind gate with
no gate context and oversized question contexts opened with no material
anywhere instead of being refused. Only a dropped gate context now exempts
the guard.

RED: a new case in gate-ask-handler.test.ts (no gate context, non-exempt
kind, question contexts alone over budget) failed before this change,
matching a live probe against the PR head (contextOmitted: true, context:
null, ok: true where it should have been refused).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant