Skip to content

docs(agents): treat catalog data as live behavior - #187458

Merged
obviyus merged 2 commits into
mainfrom
docs/agents-catalog-data
Oct 29, 2026
Merged

obviyus merged 2 commits into
mainfrom
docs/agents-catalog-data

Conversation

@obviyus

@obviyus obviyus commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Catalog data reaches every released install within hours, with no release. Agents treat manifest rows as inert metadata, so per-model facts keep landing as exact-ID code (35 of 37 model launches since July needed code), and data edits can change released behavior without anyone checking.

User Impact

There is no runtime change. Agents that work on models now follow 4 more rules in src/plugins/AGENTS.md "Model Listing":

  • New model in a known family: add a manifest row with its thinking data and input, not new ID-list entries.
  • An exact-ID rule is allowed only for a fact the catalog cannot express yet, with a comment citing its live probe or vendor source.
  • Catalog data is live behavior. Before changing thinkingLevelMap, compat or input on a shipped row, compare the offered levels and request bodies on the stable, extended-stable and beta readers. Report the result in the PR, and change only what a dated live probe supports.
  • Hosted rows parse strictly. On 2026.10.8 and earlier, one unknown row field rejects the whole refresh; current main skips only that row. New facts go inside compat or thinkingLevelMap. Any other field needs a schema decision first.

Why This Change Was Made

  • Measured on main: 364 exact-ID model matchers exist in code.
  • Moonshot's manifest disagrees with its code for K3: the manifest lists low/high/max, but the code forces max. Publishing that row unchanged would change what released installs send.
  • Strict readers drop rows with unknown fields. That is what forced catalog v3 (feat(decisions): preserve native catalog capabilities and accounting #157492).

Decision (models and catalog maintainer): catalog data safety is enforced through AGENTS.md guidance and PR evidence, not a hard CI block on publishing.

Evidence

  • pnpm check:agents-md-size: all files are within 20000 chars.
  • oxfmt --check and git diff --check pass.
  • I checked the claims on main:
    • Strict rows: v2026.9.35 and v2026.10.8 validate z.array(modelV2Schema) as a whole, and main skips invalid rows (packages/model-catalog-core/src/remote-catalog-bundle.ts).
    • v2026.9.35 reads thinkingLevelMap in src/auto-reply/thinking.ts.
    • The 4-hour publish cron is in openclaw/catalog .github/workflows/publish.yml.

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Oct 29, 2026
@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR adds catalog compatibility guidance and requires evidence for model-specific exceptions in the existing agent instructions.

Example: An editor adds an unknown top-level field to a hosted v2 model row consumed by OpenClaw v2026.10.8.

  • Before: The guide does not explain that the change rejects the entire catalog refresh.
  • After: The guide identifies whole-refresh rejection on released readers and directs new fields through a schema decision.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-verified documentation change with the previous finding fixed and no remaining actionable defects.
Proof confidence 🐚 platinum hermit (4/6) This PR changes agent guidance only; released-reader source, current ingestion code, publisher configuration, and exact-head documentation checks support its claims.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Docs · Worth it: Yes · Fix scope: Complete
User problem: Catalog edits can change released model controls and request bodies without an OpenClaw release, while undocumented model exceptions obscure those effects.
Reason: The collaborator-authored direction adds concise safeguards at the existing instruction owner without changing runtime behavior or introducing a publishing gate.

Merge readiness

✅ Ready for maintainer review

This PR is ready for normal landing consideration: the earlier accuracy finding is resolved, the guidance matches released and current readers, and no actionable defects remain.

Priority: P3
Reviewed head: 4ed3bfc30fc735192f9ef76c696974e736881934

Before merge

None.

Findings

None.

Agent review details

How this fits together

Provider manifests feed the hosted catalog, whose readers supply model capabilities to selection controls and request construction; this PR changes instructions for editors of that flow.

flowchart LR
  A[Agent instructions] --> B[Catalog editor]
  B --> C[Provider manifests]
  C --> D[Hosted catalog]
  D --> E[Released and main readers]
  E --> F[Model controls and requests]
Loading

Technical review

Best possible solution:

Land the focused guidance in the existing Model Listing section with the corrected released-reader explanation.

Do we have a high-confidence way to reproduce the issue?

No runtime reproduction is needed for this instruction-only change; source inspection verifies the central reader-compatibility claims.

Is this the best way to solve the issue?

The diff is the smallest complete documentation change: it uses the existing policy owner, preserves capability-driven behavior, and adds no parallel mechanism or test scaffolding.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against da8f9079520f.

Provenance checked

  • Capability-first model guidance changes intended behavior with a stated reason (0aced8c: The merged guidance recorded recurring model-listing failures and required listed capabilities rather than exact-ID rules.)

Security

None.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit 0aced8c adds src/plugins/AGENTS.md:44 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0aced8c8e62e; files: src/plugins/AGENTS.md)
  • Peter Steinberger: Raw commit 9ec974a adds src/plugins/AGENTS.md:30 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9ec974a4837e; files: src/plugins/AGENTS.md)

PR surface

Docs +3. Total +3 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 1 4 1 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 4 1 +3

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is a focused documentation improvement with no runtime, configuration, or persisted-data change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-29T07:41:29.380Z sha d7575fd :: needs changes before merge. :: [P3] Describe whole-update rejection on released readers

Reviewed October 29, 2026, 4:06 AM ET / 08:06 UTC (Revision 2).

@obviyus

obviyus commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Oct 29, 2026
@obviyus
obviyus merged commit 011a170 into main Oct 29, 2026
107 of 108 checks passed
@obviyus
obviyus deleted the docs/agents-catalog-data branch October 29, 2026 08:08
@obviyus

obviyus commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Landed as 011a170.

  • Problem: catalog data reaches released installs within hours with no release, but agents treated manifest rows as inert. 35 of 37 launches since July needed code.
  • Fix: src/plugins/AGENTS.md Model Listing now adds:
    • New models ship as manifest rows. Exact-ID rules only with a cited probe or vendor source.
    • Catalog data changes on shipped rows are compared on released readers, and changes need a dated live probe.
    • Hosted rows parse strictly. On 2026.10.8 and earlier, one unknown row field rejects the whole refresh.
  • Decision: guidance and PR evidence, not a hard publishing block.
  • Proof: docs only. Size and format checks pass, CI is green, and ClawSweeper says ready on 4ed3bfc. Thanks to ClawSweeper for catching the whole-refresh rejection.

obviyus added a commit that referenced this pull request Oct 29, 2026
## What Problem This Solves

Catalog thinking data (`thinkingLevelMap`, reasoning-effort compat) on shipped rows has no recorded proof of what each provider route accepts. Some facts are only knowable by a live request.

## User Impact

No user-visible change. Maintainers can run `pnpm test:live:thinking-probe -- --provider <p> --model <m> [--routes a,b]` and commit a dated record, `extensions/<plugin>/probes/<model>.<provider>.<YYYY-MM-DD>.json` (one file per route, so routes owned by one plugin do not overwrite each other), to support a catalog-data change.

## Why This Change Was Made

- For each route, one real agent turn runs on an isolated in-process Gateway for every level in `MODEL_DATA_THINKING_LEVELS`.
- Each model HTTP request is observed through the transport host's `buildModelFetch` (the same hook the Ultra wire check uses), without changing its bytes. Per turn the record keeps:
  - the URL with no query string
  - the request params without conversation content (so the effort actually sent shows)
  - the HTTP status
  - the redacted error body
  - the model ID, usage and the reply
- The record holds raw facts only. No error classification.
- **Config-only row.** Provider plugin thinking hooks can narrow a shipped row. For example, `extensions/moonshot/provider-policy-api.ts` offers only `max` for K3, so the Gateway rejects every other level before any request. The probe therefore runs each route as `probe-<route>`: a config-only copy of the shipped manifest row (same `api`, `baseUrl`, headers, limits) that offers every level, each sent as its own value. The record stores that row.
- **Keys.** Keys come only from env vars named in the owning manifest's `setup.providers[].envVars`. The row references the key as `{source: "env"}`.
  - The wrapper points `HOME` at an empty temp dir. Without that, shared live setup (`test/test-env.ts`) copies `~/.openclaw` credentials and the auth-profile store into the test home.
  - The wrapper resolves the test runtime first and binds the pinned Bun path only for a Bun run, so `OPENCLAW_VITEST_RUNTIME=node` works on machines without Bun.
  - The wrapper refuses to run in CI. No CI hydration and no new blocking contract.
- **Writer guards.** The writer refuses a record that contains any of the route's env key values. Errors pass through `redactSensitiveText`, then an account-ID scrub, because Moonshot 429 bodies echo the org ID and the API-key ID.
- **`src/plugins/AGENTS.md`.** The "Catalog data is live behavior" bullet (from #187458) now links the probe command after "change only what a dated live probe of that route supports".

Size: about 520 lines of test tooling, about 100 lines of offline test, 28 lines of docs and guidance, and the 439-line probe record. Production code: 0 lines.

pr-simplify (run before opening this PR):
- Merged the two redaction functions.
- Dropped a speculative `Request`-input body path.
- Dropped the writer's re-checks of data the probe itself produced, and their test.
- Replaced a hand-rolled flag parser with `node:util` `parseArgs`.
- Typed the probe row as `ModelProviderConfig`.

## Evidence

Live run on this head, route `moonshot`, model `kimi-k3`, key `MOONSHOT_API_KEY` from env:

```
[thinking-probe] moonshot/kimi-k3 off: 200
[thinking-probe] moonshot/kimi-k3 minimal: 200
[thinking-probe] moonshot/kimi-k3 low: 200
[thinking-probe] moonshot/kimi-k3 medium: 429,429,429,429,429,429,200
[thinking-probe] moonshot/kimi-k3 high: 200
[thinking-probe] moonshot/kimi-k3 xhigh: 200
[thinking-probe] moonshot/kimi-k3 max: 429,429,429,429,200
Tests  1 passed (1)
```

| level | `reasoning_effort` sent | final status | reasoning tokens | reply |
|---|---|---|---|---|
| off | unset | 200 | 87 | OK |
| minimal | minimal | 200 | 1 | OK |
| low | low | 200 | 17 | OK |
| medium | medium | 200 | not reported | OK |
| high | high | 200 | 2 | OK |
| xhigh | xhigh | 200 | 30 | OK |
| max | max | 200 | not reported | OK |

The 429s come from the account's 3 RPM limit. The runtime retried them. On this date, Moonshot direct returned 200 for every `reasoning_effort` value, and with `off` (no effort sent) K3 still produced reasoning tokens. The record states facts; it does not change the catalog.

Committed probe file checks:
- no match for the full key or its first 12 characters
- no org ID or API-key ID
- no local paths

Earlier runs on this branch found and fixed two problems:
1. Shipped-provider turns were rejected by the plugin hook before any request. This is why the probe uses a config-only row.
2. The org and key IDs leaked through a JSON `<` escape. Fixed by decoding escapes before the scrub, with a regression test.

Offline and static checks:
- `pnpm exec vitest run src/gateway/thinking-probe.test-helpers.test.ts`: 4 passed. Covers one dated file per route for two routes in one plugin, refusing a credential value, manifest route lookup, and account-ID redaction through `<`.
- `pnpm tsgo:core:test` and `pnpm tsgo:scripts` are clean. `oxlint --type-aware` is clean on all changed files.
- `OPENCLAW_VITEST_RUNTIME=node OPENCLAW_BUN_PATH=/nonexistent/bun` reaches the live test (route lookup error), so no Bun is needed for a Node run.
- `CI=1` refuses to run. Missing `--provider` or `--model` prints usage.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 30, 2026
## What Problem This Solves

Catalog data reaches every released install within hours, with no release. Agents treat manifest rows as inert metadata, so per-model facts keep landing as exact-ID code (35 of 37 model launches since July needed code), and data edits can change released behavior without anyone checking.

## User Impact

There is no runtime change. Agents that work on models now follow 4 more rules in `src/plugins/AGENTS.md` "Model Listing":
- **New model in a known family:** add a manifest row with its thinking data and `input`, not new ID-list entries.
- **An exact-ID rule is allowed only** for a fact the catalog cannot express yet, with a comment citing its live probe or vendor source.
- **Catalog data is live behavior.** Before changing `thinkingLevelMap`, `compat` or `input` on a shipped row, compare the offered levels and request bodies on the stable, extended-stable and beta readers. Report the result in the PR, and change only what a dated live probe supports.
- **Hosted rows parse strictly.** On 2026.10.8 and earlier, one unknown row field rejects the whole refresh; current `main` skips only that row. New facts go inside `compat` or `thinkingLevelMap`. Any other field needs a schema decision first.

## Why This Change Was Made

- **Measured on `main`:** 364 exact-ID model matchers exist in code.
- **Moonshot's manifest disagrees with its code** for K3: the manifest lists `low`/`high`/`max`, but the code forces `max`. Publishing that row unchanged would change what released installs send.
- **Strict readers drop rows with unknown fields.** That is what forced catalog v3 (openclaw#157492).

**Decision (models and catalog maintainer):** catalog data safety is enforced through `AGENTS.md` guidance and PR evidence, not a hard CI block on publishing.

## Evidence

- `pnpm check:agents-md-size`: all files are within 20000 chars.
- `oxfmt --check` and `git diff --check` pass.
- I checked the claims on `main`:
  - Strict rows: v2026.9.35 and v2026.10.8 validate `z.array(modelV2Schema)` as a whole, and `main` skips invalid rows (`packages/model-catalog-core/src/remote-catalog-bundle.ts`).
  - v2026.9.35 reads `thinkingLevelMap` in `src/auto-reply/thinking.ts`.
  - The 4-hour publish cron is in `openclaw/catalog` `.github/workflows/publish.yml`.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 30, 2026
## What Problem This Solves

Catalog thinking data (`thinkingLevelMap`, reasoning-effort compat) on shipped rows has no recorded proof of what each provider route accepts. Some facts are only knowable by a live request.

## User Impact

No user-visible change. Maintainers can run `pnpm test:live:thinking-probe -- --provider <p> --model <m> [--routes a,b]` and commit a dated record, `extensions/<plugin>/probes/<model>.<provider>.<YYYY-MM-DD>.json` (one file per route, so routes owned by one plugin do not overwrite each other), to support a catalog-data change.

## Why This Change Was Made

- For each route, one real agent turn runs on an isolated in-process Gateway for every level in `MODEL_DATA_THINKING_LEVELS`.
- Each model HTTP request is observed through the transport host's `buildModelFetch` (the same hook the Ultra wire check uses), without changing its bytes. Per turn the record keeps:
  - the URL with no query string
  - the request params without conversation content (so the effort actually sent shows)
  - the HTTP status
  - the redacted error body
  - the model ID, usage and the reply
- The record holds raw facts only. No error classification.
- **Config-only row.** Provider plugin thinking hooks can narrow a shipped row. For example, `extensions/moonshot/provider-policy-api.ts` offers only `max` for K3, so the Gateway rejects every other level before any request. The probe therefore runs each route as `probe-<route>`: a config-only copy of the shipped manifest row (same `api`, `baseUrl`, headers, limits) that offers every level, each sent as its own value. The record stores that row.
- **Keys.** Keys come only from env vars named in the owning manifest's `setup.providers[].envVars`. The row references the key as `{source: "env"}`.
  - The wrapper points `HOME` at an empty temp dir. Without that, shared live setup (`test/test-env.ts`) copies `~/.openclaw` credentials and the auth-profile store into the test home.
  - The wrapper resolves the test runtime first and binds the pinned Bun path only for a Bun run, so `OPENCLAW_VITEST_RUNTIME=node` works on machines without Bun.
  - The wrapper refuses to run in CI. No CI hydration and no new blocking contract.
- **Writer guards.** The writer refuses a record that contains any of the route's env key values. Errors pass through `redactSensitiveText`, then an account-ID scrub, because Moonshot 429 bodies echo the org ID and the API-key ID.
- **`src/plugins/AGENTS.md`.** The "Catalog data is live behavior" bullet (from openclaw#187458) now links the probe command after "change only what a dated live probe of that route supports".

Size: about 520 lines of test tooling, about 100 lines of offline test, 28 lines of docs and guidance, and the 439-line probe record. Production code: 0 lines.

pr-simplify (run before opening this PR):
- Merged the two redaction functions.
- Dropped a speculative `Request`-input body path.
- Dropped the writer's re-checks of data the probe itself produced, and their test.
- Replaced a hand-rolled flag parser with `node:util` `parseArgs`.
- Typed the probe row as `ModelProviderConfig`.

## Evidence

Live run on this head, route `moonshot`, model `kimi-k3`, key `MOONSHOT_API_KEY` from env:

```
[thinking-probe] moonshot/kimi-k3 off: 200
[thinking-probe] moonshot/kimi-k3 minimal: 200
[thinking-probe] moonshot/kimi-k3 low: 200
[thinking-probe] moonshot/kimi-k3 medium: 429,429,429,429,429,429,200
[thinking-probe] moonshot/kimi-k3 high: 200
[thinking-probe] moonshot/kimi-k3 xhigh: 200
[thinking-probe] moonshot/kimi-k3 max: 429,429,429,429,200
Tests  1 passed (1)
```

| level | `reasoning_effort` sent | final status | reasoning tokens | reply |
|---|---|---|---|---|
| off | unset | 200 | 87 | OK |
| minimal | minimal | 200 | 1 | OK |
| low | low | 200 | 17 | OK |
| medium | medium | 200 | not reported | OK |
| high | high | 200 | 2 | OK |
| xhigh | xhigh | 200 | 30 | OK |
| max | max | 200 | not reported | OK |

The 429s come from the account's 3 RPM limit. The runtime retried them. On this date, Moonshot direct returned 200 for every `reasoning_effort` value, and with `off` (no effort sent) K3 still produced reasoning tokens. The record states facts; it does not change the catalog.

Committed probe file checks:
- no match for the full key or its first 12 characters
- no org ID or API-key ID
- no local paths

Earlier runs on this branch found and fixed two problems:
1. Shipped-provider turns were rejected by the plugin hook before any request. This is why the probe uses a config-only row.
2. The org and key IDs leaked through a JSON `<` escape. Fixed by decoding escapes before the scrub, with a regression test.

Offline and static checks:
- `pnpm exec vitest run src/gateway/thinking-probe.test-helpers.test.ts`: 4 passed. Covers one dated file per route for two routes in one plugin, refusing a credential value, manifest route lookup, and account-ID redaction through `<`.
- `pnpm tsgo:core:test` and `pnpm tsgo:scripts` are clean. `oxlint --type-aware` is clean on all changed files.
- `OPENCLAW_VITEST_RUNTIME=node OPENCLAW_BUN_PATH=/nonexistent/bun` reaches the live test (route lookup error), so no Bun is needed for a Node run.
- `CI=1` refuses to run. Missing `--provider` or `--model` prints usage.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant