Skip to content

feat(t27os): OpenCode free pool as a second executor, law in .t27 (Refs #12975) - #12977

Merged
cursor[bot] merged 4 commits into
masterfrom
claude/opencode-free-pool
Nov 9, 2026
Merged

cursor[bot] merged 4 commits into
masterfrom
claude/opencode-free-pool

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #12975. Does not close it: the work-card fields (executor, model) and the live catalog reader are later lanes.

What this adds

One new spec, specs/t27os/opencode_free.t27 (module T27osOpencodeFree), the owner's "go" of 2026-10-31 as law:

  • Free means price 0 on input and output, read from the live Zen catalog; a missing price is not zero. No model name is hardcoded as free.
  • Provider allowlist: only the Zen provider is selectable, so a paid model in the environment cannot be picked by a lane.
  • Content gate: non-public content only to glm-5.3-flash-free and deepseek-v4.1-flash-free; every other model, and every model with an unknown data class, gets public content only.
  • Route by task class: pool, Claude, or owner. Owner-class jobs (secrets, deletion, upstream, publication, payment) never start in a lane; only a security task can be lifted to the pool, and only on the owner's word.
  • Lane states and quota: a FreeUsageLimitError waits the whole pool until its Retry-After (no model rotation, no retry loop, no probe while waiting); an ordinary 429 waits at least RATE_COOLDOWN_S.
  • Probe rule: one probe per model, no repository content, only while the lane is available.
  • Card badge: free never reads as unlimited.

Receipts (2026-10-31, public-safe)

Eight probes, one per free model, prompt "Reply with the single word ok.", no repository content, nothing installed or upgraded:
all eight answered HTTP 429 FreeUsageLimitError, the same Retry-After (about 62,200 s), shared reset about 2026-11-01T00:00Z. The limit is pool-wide, so rotating models does not help. Measured free capacity until the reset: zero. The per-day allowance is unpublished and still unmeasured; further probing waits for the reset and is outside the one-probe authorization.

Verification

  • t27c check: OK.
  • Tests are not run locally (Mac load rule); this draft PR lets CI run them. No seal is committed: it must come from a master-built t27c (stale unstamped local binary not used).
  • tools/dupe_scan.py: --like reports nothing in this file written elsewhere. The full scan is red on master's own tip (fix_may_start group copied, in no ledger) with or without this file; groups stay 689 either way. Not blessed here.
  • lefthook foreign-budget, own-language and secret-gate pass on commit and push.

Not in this PR

Executor and model fields on the work card (specs/queen/tasks.t27, dashboard.t27), the live catalog reader, the pane profile for Zen, any coding lane. Each is its own issue after this one.

🤖 Generated with Claude Code


Note

Medium Risk
The PR codifies security-sensitive routing and data-class rules that will govern executors once wired, but changes are spec-only with no runtime hooks in this diff.

Overview
Adds specs/t27os/opencode_free.t27 (T27osOpencodeFree), a new pure-decision spec that defines how a lane may use OpenCode’s Zen free pool and NVIDIA as a second executor—without implementing catalog I/O or live lanes in this PR.

Selection and content: Models count as free only when both catalog input/output prices are zero (PRICE_UNKNOWN is never free). Only providers opencode and nvidia pass provider_allowed. Content is gated via lane_ok / provider_may_receive: probes and public text may go to any free model; non-public text is limited to glm-5.3-flash-free and deepseek-v4.1-flash-free on Zen; NVIDIA lanes accept probe or public only regardless of model name.

Routing and safety: route_task sends low-risk work to the free pool, keeps architecture/security/multi-file/release/long-context on Claude (security to the pool only with owner approval), and never starts owner-class jobs (secrets, credentials, deletion, upstream, publish, payment) in a lane.

Quota, probes, and UI: HTTP mapping includes pool-wide FreeUsageLimitError, per-model rate limits (minimum RATE_COOLDOWN_S from keys.t27), LS_UNPROVEN / LS_NO_ENTITLEMENT for NVIDIA-style entitlement failures, one content-free probe per model while unproven, and card badge values so free capacity is never shown as unlimited.

The file ships with a large embedded test suite covering the rules above; integration with agents, work cards, and a catalog reader is explicitly deferred.

Reviewed by Cursor Bugbot for commit b2078ab. Bugbot is set up for automated code reviews on this repo. Configure here.

…/quota law (Refs #12975)

New spec specs/t27os/opencode_free.t27 (module T27osOpencodeFree):
- free means price 0 on input AND output; a missing price is not zero
- provider allowlist: only the Zen provider, so a paid model cannot be picked
- content gate: non-public content only to glm-5.3-flash-free and
  deepseek-v4.1-flash-free; every other model, and every unknown one, public only
- route by task class: pool, Claude, or owner; owner-class jobs never start
- lane states with a pool-wide wait on FreeUsageLimitError, no rotation, no loop
- one probe per model, no repository content, only while the lane is available
- card badge: free never reads as unlimited

Probe receipts 2026-10-31: eight probes, one per free model, all HTTP 429
FreeUsageLimitError, pool-wide, shared reset about 2026-11-01T00:00Z.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-31 06:53:16 UTC

Summary

Status Count
Total Open PRs 32
PRs with Failing Checks 31
PRs with All Checks Green 1
READY 0
FAILING 31
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 31 + 0 + 0 = 31, and there are 32 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e75b498e5e79 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag

Copy link
Copy Markdown
Collaborator Author

CI triage for head 6f20bba (Refs #12975). This PR changes one file, specs/t27os/opencode_free.t27. All seven red checks fail on files it does not touch, and no failing log mentions opencode. The PR is NOT fully green and stays a draft. Nothing was blessed, disabled or fixed here.

Fingerprints (policy: skill analog-emulation, lesson 2026-10-31). Master commit is 4cfd2f2 for every row.

check failing step failure_signature master run PR run owner
Documented t27c subcommands exist Read the live documents FAIL: dead tri mentions rose 68 -> 77. 124454610669 124470539125 #12981
cli-tri No census moved without saying so quiet moved / shell moved: workflow files read 71 -> 70 124454610974 124470539330 PR #12971 (#12968)
coverage Every seal still describes its spec step exits 1, stale ledger counters 124454610821 124470539224 #12972
spec-guards Does every seal still describe what the compiler emits step exits 1, same seal-description ledger 124454610530 124470538807 #12972
gate-topology Gate inventory must match the workflows directory DIR-ONLY stale-arm-repair (workflow not in the matrix; regenerate the spec) 124454610615 124470539086 PR #12967 (#12963)
duplicate-bodies No new duplicate body, and no known group grew group fix_may_start copied (pick_may_run in the night loop spec); red with this PR's spec removed 124454610635 124470539543 #12981
emit-bitexact No spec newly fails to generate FAIL: 5 spec(s) newly do not generate with any backend (wasm_board_ax7203, three shootout parse errors, improve.t27 unresolved use) none 124470539240 PR #12965 (#12964) for wasm_board_ax7203; #12981 for the rest

pr_changes: specs/t27os/opencode_free.t27 only (it has no tri command text, so it adds no dead mention). blocks_merge: none of these is a required check on master (only 4 are); this PR is not marked ready while they stand.

Not proven: condition 1 for emit-bitexact. No run of that workflow exists on master at 4cfd2f2, so "red on master" rests on the five failing files all existing unchanged in the base commit. Also pending: the Corpus ratchet run on this PR (it was red on the base commit too, run 124454610439); whether the tests inside opencode_free.t27 pass is not yet confirmed by any job, and the seal is not saved (needs a master-built t27c).

…probe receipts (Refs #12975)

Provider nvidia is admitted next to Zen: a NVIDIA model starts UNPROVEN (a listed
price of 0 is not an entitlement), gets one content-free probe, and only a 2xx with
text makes it available. 401/402/403 moves it to NO_ENTITLEMENT, which a fresh listing
does not lift (only the owner's re-arm does). NVIDIA models get public text or a probe
only; the Zen pool limit never stops a NVIDIA lane. Header carries the 2026-10-31
receipts: 10 of 15 answered, 4 timed out (recorded OTHER), 1 invalid-request.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@gHashTag

Copy link
Copy Markdown
Collaborator Author

NVIDIA models are now in the lane law (commit 29bae57, Refs #12975).

What changed in specs/t27os/opencode_free.t27: provider nvidia is admitted next to Zen. A NVIDIA model starts UNPROVEN (a listed price of 0 is not an entitlement), gets one content-free probe, and only a 2xx with text makes it available. HTTP 401, 402 or 403 puts it in NO_ENTITLEMENT, which a fresh listing does not lift (only the owner's re-arm does). NVIDIA models get public text or a probe only, and the Zen pool limit never stops a NVIDIA lane. t27c check passes; no test has run yet (the Mac does not run test-report, CI is the lab) and no seal is saved.

Probe receipts, 2026-10-31, one content-free probe per model ("Reply with the single word ok.", empty throw-away directory, 110 s limit, through OpenCode's stored credential, no repo content):

Result Models
Answered with text (10 of 15) openai/gpt-oss-20b, google/diffusiongemma-26b-a4b-it, meta/muse-glimmer-30b, minimaxai/minimax-m3.1-flash, nvidia/nemotron-3-nano-omni-30b-a3b-reasoning, nvidia/nemotron-3-ultra-550b-a55b, nvidia/nemotron-3.5-lightning-30b-a3b, nvidia/nemotron-3.5-super-vl-120b-a12b, poolside/laguna-xs-2.1, stepfun-ai/step-5-preview
No text in 110 s (4), a timeout and not a refusal, recorded OTHER deepseek-ai/deepseek-v4.1-flash, google/gemma-4-31b-it, meta/llama-3.2-90b-vision-instruct, z-ai/glm-5.3-flash
provider.invalid-request after 1 s (1), a function not deployed for the account meta/llama-3.2-11b-vision-instruct

The same keys listed the catalogue on 2026-10-26 and got 403 on chat, so each result is a dated measurement of one call, not a standing entitlement. Re-probe before leaning on it.

Corpus ratchet (expected-failure ledger) is red on this PR with the same verdict as on master at the base commit: 5 unexpected failures (specs/fpga/wasm_board_ax7203.t27, four specs/tri/shootout/*.t27) and 3 unexpected passes (specs/port/browseros/...). This spec is not in either list. Nothing was blessed or disabled. Tracked in #12981.

Follow-ups filed: #12983 (key master NVIDIA profile for OpenCode panes, specs/t27os/keys.t27) and #12984 (executor, model and lane-state fields on the work card, specs/queen/tasks.t27 and specs/queen/dashboard.t27). The live catalog reader is still open.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-31 07:38:17 UTC

Summary

Status Count
Total Open PRs 34
PRs with Failing Checks 33
PRs with All Checks Green 1
READY 0
FAILING 33
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 33 + 0 + 0 = 33, and there are 34 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e75b498e5e79 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-31 13:23:25 UTC

Summary

Status Count
Total Open PRs 36
PRs with Failing Checks 33
PRs with All Checks Green 3
READY 0
FAILING 33
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 33 + 0 + 0 = 33, and there are 36 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e75b498e5e79 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

This was referenced Nov 9, 2026
@cursor
cursor Bot marked this pull request as ready for review November 9, 2026 19:52
@cursor
cursor Bot enabled auto-merge (squash) November 9, 2026 19:53

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9bff988. Configure here.

pub fn may_call(state : u32, now_s : u64, until_s : u64) -> bool {
if (state == LS_AVAILABLE) { return true; }
if (state == LS_WAITING_QUOTA) { return now_s >= until_s; }
return false;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unproven 429 unlocks work

High Severity

next_state moves LS_UNPROVEN to LS_WAITING_QUOTA on EV_RATE_LIMIT or EV_FREE_USAGE_LIMIT, and once the wait expires may_call allows work with no EV_OK. probe_ok then refuses another probe because the state is no longer LS_UNPROVEN. NVIDIA law requires a 200 with text before work; this path is also the 2026-10-31 Zen receipt (every free model returned FreeUsageLimitError).

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9bff988. Configure here.

}
if (state == LS_UNAVAILABLE) {
if (ev == EV_LISTED_FREE) { return LS_AVAILABLE; }
return LS_UNAVAILABLE;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relisting skips entitlement probe

High Severity

next_state sends every LS_UNAVAILABLE lane to LS_AVAILABLE on EV_LISTED_FREE, with no memory of whether the model ever got EV_OK. Combined with LS_UNPROVEN plus EV_GONE, a never-probed NVIDIA model becomes callable after a catalog blip, even though a listed price of 0 is not an entitlement.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9bff988. Configure here.

pub fn probe_ok(done : u32, content : u32, state : u32) -> bool {
if (done >= PROBES_PER_MODEL) { return false; }
if (content != CC_NONE) { return false; }
return state == LS_UNPROVEN;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-arm cannot send another probe

Medium Severity

EV_OWNER_REARM returns a refused model to LS_UNPROVEN so the owner can probe once more, but probe_ok still forbids it once done >= PROBES_PER_MODEL (1, “ever”). may_call is false in LS_UNPROVEN, so the re-armed lane cannot be probed or given work.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9bff988. Configure here.

Co-authored-by: Dmitrii Vasilev <gHashTag@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-11-09 21:13:05 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 47
PRs with All Checks Green 3
READY 0
FAILING 47
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 47 + 0 + 0 = 47, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b882be1e4933 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@cursor
cursor Bot merged commit 7433ae1 into master Nov 9, 2026
46 of 55 checks passed
@cursor
cursor Bot deleted the claude/opencode-free-pool branch November 9, 2026 21:32
cursor Bot pushed a commit that referenced this pull request Nov 9, 2026
…#12983) (#12986)

* feat(t27os): an NVIDIA profile for OpenCode panes in the key master, outside the chain (Refs #12983)

PR_NVIDIA sits above the four chain profiles; agent_profile_ok_stored admits it for OpenCode only while an NVIDIA key is stored. The inline config names provider nvidia alone (enabled_providers), holds the key by reference and no model id. Tests pin key present/absent, paid provider, unknown profile and the key-free config text. Refs #12975, #12977.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* chore(seals): re-save t27os_T27osKeys after the NVIDIA profile (Refs #12983)

One seal file. Saved with the post-#12824 t27c at ~/t27-lanes/t27c-bc19b54e6
(base bc19b54), on the owner's word for exactly one save, run from a shell
cell. The spec hash and the four generated-code hashes now describe keys.t27
at this head; tests 115 -> 117.

Refs #12983

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Dmitrii Vasilev <gHashTag@users.noreply.github.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.

2 participants