Prefer the gateway's api_* once listed; lab_api_* is the fallback (0.3.4) #10

Merged
claude merged 3 commits from oss-oo/prefer-gateway-api into main 2026-10-27 19:25:30 +00:00
Member

What

This is the owner's decision on the overlap between this plugin's lab_api_* and the gateway's api_* (option B, 2026-10-27).

  • The gateway's tools come first once listed. As soon as the laboratory's gateway lists api_spec, api_read and api_write (laboratory#163), sessions prefer them, for three reasons:
    • they serve every agent family alike;
    • their answers also give total_count and the paging link;
    • they keep a per-token budget.
  • lab_api_* stay as the direct fallback. They are used when the gateway's tools are not listed or the gateway does not answer. They talk to the laboratory without the gateway.
  • A refusal is never retried on the other door. Both doors enforce the same guard, whose decision tables digest to the same SHA-256 (b4e86f74…, pinned on both sides since 0.3.3).

The skill, the README and the three lab_api_* tool descriptions say this. No code path changes. Version 0.3.4.

Until the gateway lists the tools, nothing changes in practice: lab_api_* are the only door. After the deploy, the preference takes effect without another release.

Evidence

  • Gate (sh scripts/check.sh): exit 0. It ran 460 Python tests, the asset check, claude plugin validate and 18 mod tests.
  • Basis for the decision (receipts from #9): over the live API description, the plugin and the gateway decide all 519 operations alike, and the same reads give the same data. The gateway alone reports total_count; for /repos/OSS-OO/laboratory/pulls that was 158.

🤖 Generated with Claude Code

## What This is the owner's decision on the overlap between this plugin's `lab_api_*` and the gateway's `api_*` (option B, 2026-10-27). - **The gateway's tools come first once listed.** As soon as the laboratory's gateway lists `api_spec`, `api_read` and `api_write` ([laboratory#163](https://oss-oo.io/OSS-OO/laboratory/pulls/163)), sessions prefer them, for three reasons: - they serve every agent family alike; - their answers also give `total_count` and the paging `link`; - they keep a per-token budget. - **`lab_api_*` stay as the direct fallback.** They are used when the gateway's tools are not listed or the gateway does not answer. They talk to the laboratory without the gateway. - **A refusal is never retried on the other door.** Both doors enforce the same guard, whose decision tables digest to the same SHA-256 (`b4e86f74…`, pinned on both sides since 0.3.3). The skill, the README and the three `lab_api_*` tool descriptions say this. No code path changes. Version 0.3.4. Until the gateway lists the tools, nothing changes in practice: `lab_api_*` are the only door. After the deploy, the preference takes effect without another release. ## Evidence - **Gate** (`sh scripts/check.sh`): exit 0. It ran 460 Python tests, the asset check, `claude plugin validate` and 18 mod tests. - **Basis for the decision** (receipts from #9): over the live API description, the plugin and the gateway decide all 519 operations alike, and the same reads give the same data. The gateway alone reports `total_count`; for `/repos/OSS-OO/laboratory/pulls` that was 158. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude agent added 1 commit 2026-10-27 19:06:36 +00:00
Prefer the gateway's api_* once listed; lab_api_* is the fallback
All checks were successful
ci / check (pull_request) Successful in 13s
553163bc77
The owner's decision on the overlap (2026-10-27, option B): once the
laboratory's gateway lists api_spec, api_read and api_write
(laboratory#163), sessions use those, because they serve every agent
family alike, report total_count and the paging link and keep a
per-token budget. This plugin's lab_api_* stay as the direct fallback
for when the gateway's tools are missing or the gateway does not answer.
Both enforce the same guard (same digest), so a refusal on one door is
never retried on the other.

The skill, the README and the three lab_api_* tool descriptions say so;
no code path changes. Version 0.3.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent added 1 commit 2026-10-27 19:18:59 +00:00
Door rules after review: a budget limit is no outage, one guard
All checks were successful
ci / check (pull_request) Successful in 13s
5a44aa4902
- An HTTP 429 from the gateway's budget is no outage, even when it
  arrives before the tool runs: wait for its Retry-After and call the
  gateway again, never switch to lab_api_*. Otherwise the budget could
  be stepped around. The fallback is only for tools that are not listed
  or a gateway that cannot be reached at all. If the fallback fails
  too, stop and tell the user; if the spec tools print different
  digests, tell the user before writing.
- The three lab_api_* descriptions carry the same symmetric rule.
- Precise claims: one guard (not every limit) is shared; the gateway
  adds a budget, refuses answers over 1 MiB, takes at most 12 words
  (256 characters) in api_spec and a query only as an object. The
  identity is claude unless the identity option names another one for
  lab_api_*, which that option has also driven since 0.3.0 (README,
  manifest).
- Releases are writable, but an asset upload needs a multipart form
  that neither door sends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent added 1 commit 2026-10-27 19:24:20 +00:00
Door rules, final wording: the 429 rule has an exit
All checks were successful
ci / check (pull_request) Successful in 13s
19b1b12118
- A gateway 429 is waited out once; if the gateway is still limited,
  or names no wait (budget tracker full), the session stops and tells
  the user instead of calling again forever.
- The leftover broad "a refusal means the same on both doors" line is
  gone; the door rules say "what the guard refuses".
- Exact limits: the query of api_read and api_write must be an object
  (api_spec's is a keyword string); api_spec takes at most 12 distinct
  words and 256 characters; the budget caps the request rate, shared
  by every session of a token.
- An asset upload needs a file body, which neither door sends (both
  send JSON only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent merged commit 0a6628e3cf into main 2026-10-27 19:25:30 +00:00
claude agent deleted branch oss-oo/prefer-gateway-api 2026-10-27 19:25:30 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
OSS-OO/claude-plugin!10
No description provided.