The run page mixed English stage events and agent summaries into the
Chinese console. Messages are now written in Simplified Chinese at their
source (control plane, dispatcher, worker, POC build), keeping commands,
SHAs, branches and error codes verbatim; raw runtime errors get a Chinese
prefix. The agent prompt asks for the plan, summary and questions in
Chinese. File-change parsing accepts old and new messages, and the event
label table covers every event kind written.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The stall timer chose between "idle" and "deadline" by reading the clock
when it fired. A timer armed for the idle limit could fire after the
deadline had also passed on a busy machine, and was then reported as a
deadline stop, which the proxy test caught intermittently. The reason
is now fixed when the timer is armed: whichever limit is nearer.
The two timing tests also get wider margins: the steady stream sends a
frame every 30 ms against a 300 ms idle limit, and the deadline case
can only be stopped by its deadline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Looking up a run-scoped token or a runner token ran in a write
transaction, which holds the tenant's advisory lock: anyone with a
long enough token could tie up every change of the tenant, and each
executor heartbeat, event and meter took that lock just to
authenticate. The lookups now only read.
- Continuing or answering a run queues a new generation, but until the
dispatcher started it, the old generation's token still worked and
could even lease the run again for the new requirement revision. A
generation now stops acting as soon as a newer one is pending.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The proxy aborted every upstream call 120 seconds after it started, even
while the model was still streaming, so a long reasoning turn ended as an
unknown outcome that an admin had to reconcile. Calls now stop only when
no bytes arrive for 2 minutes, or after 10 minutes in total, inside the
15 minutes after which the reaper treats a request as lost. The recorded
reason says which limit stopped it.
A rejected request (a 429, an invalid request, or one stopped before
upstream I/O) was stored and replayed for every retry of the same body,
so one rate limit stalled the run for the rest of its lease. Rejections
use no tokens, so a retry is now sent again; completed responses are
still replayed and unknown outcomes still wait for reconciliation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Building the web image showed that `next build` failed.
- The console imported runtime values from the contracts entry point.
- Turbopack cannot follow the NodeNext `.js` imports inside that entry,
which also carries zod and every schema into the browser.
- Only `next dev` had ever run before, and the console used to import
types only.
The fix:
- The executor catalog moves to an entry without imports, exported as
@wishforge/contracts/providers. The console takes its values from
there.
- providerBaseUrl moves to its own module.
- A test keeps value imports of the entry point out of the console.
With the console's default budget of 50,000 tokens, every Codex run
stopped after one model request:
- The proxy reserves one token per request byte, and a Codex request is
already about 50 KB.
- The executor then reported a bare 429 as a provider failure.
The fix:
- A request the remaining budget cannot cover now puts the run into the
`budget` wait, with what it needs and what remains.
- The console defaults to 300,000 tokens and explains the reservation.
The run page also marked the stage a successful run ended in as not yet
done; it now shows it as complete.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first runs on k3s found these problems; a wish now goes from submission
through the Codex executor, independent verification and integration in
per-run pods.
- Development deployments refused to start because the images set
NODE_ENV=production. The local manifest and the sandbox Jobs now set
NODE_ENV to the deployment mode.
- The model proxy treated x-client-request-id as a per-request idempotency
key. Codex sends its conversation id there, so every second request of a
session failed with 409. Only Idempotency-Key names a single request now.
- Codex's command sandbox (bubblewrap) cannot start in a runc pod. Every
command failed and the agent retried until the budget ran out. The
executor now probes the sandbox before starting Codex. A Kata sandbox that
cannot run it waits as PROVIDER_SANDBOX_UNAVAILABLE. A development (host)
sandbox runs Codex without it, and the timeline records that.
- The prompt asked agents to commit, but Codex keeps .git read-only and the
platform commits the checkpoint itself. Agents now leave their changes
uncommitted, and get the platform's Git identity if they commit anyway. A
resolved merge is recorded even when its tree equals HEAD.
- scripts/k3s-local.mjs:
- excludes the VM and cluster ranges from a host proxy (NO_PROXY);
- uses its own Docker client configuration, so a stale credential
helper does not break builds;
- recovers from an interrupted k3s install;
- reports when Colima switches the current kubectl or Docker context.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The model proxy always forwarded to api.openai.com and development runs gave
Codex no base URL or model, so a company model gateway could not be used.
- WF_OPENAI_BASE_URL points the production proxy (and development Codex runs)
at an OpenAI-compatible gateway with the Responses API; WF_ANTHROPIC_BASE_URL
gives Claude Code an Anthropic-compatible one as ANTHROPIC_BASE_URL. Both are
operator settings in the provider catalog, HTTPS without credentials
(loopback HTTP outside production); an invalid gateway disables the proxy.
- Development credentials now carry the run's model, so WF_CODEX_DEFAULT_MODEL
selects a model the gateway serves.
- tests/integration/real-model.test.ts (WF_REAL_MODEL_INTEGRATION=1, key from
WF_TEST_MODEL_API_KEY) runs one wish through the real Codex executor, the
verifier and integration into a local repository.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Entity carried `[key: string]: unknown`, so a misspelt field compiled and most
records were read as untyped bags. Every stored kind now has an interface in
contracts (workspace, runner task and registration, provider connection,
checkpoint record, resource allocation, integration lease, delivery config) and
the project, run, release and evidence types list all their fields. Entity writes
are generic over the record type, and the project delivery settings no longer
accept a stray target branch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Storage: read-only queries use a read-only transaction without the tenant
lock, so event streams and dashboards no longer queue behind writers; lists
filter on indexed project, run and status fields and the run list pages with
limit/before. Dispatchers claim outbox items with SKIP LOCKED and a claim
deadline; delivered items and old idempotency records are pruned hourly.
- Migrations are versioned files recorded with checksums in schema_migrations;
002 adds the claim column and run index and migrates preview-stage runs and
free-text waiting reasons. Run events and usage are append-only for the app.
- Identities: static service tokens reach only their routes (coordinator: state,
wait, repair; deployer: lease, transition, releases); the static verifier
identity is gone; Git credentials go only to the lease holder; internal bodies
are validated; framework and body-parser errors use the API error envelope.
- Quotas: only queued or running runs (or ones with an unsettled model request)
hold token reservations; continuing a run reserves its remaining budget again.
- Recovery: owners can list and reconcile model requests with an unknown outcome,
and requests whose proxy died are marked unknown; definite deployment failures
free the environment, admins can unlock an environment after checking the
target, approvals expire with their release, and production approvals need a
second person. The builder's Docker context is operator configuration.
- MCP: list_projects, absolute console links, request_release resolves the run's
evidence and default environment, and tool changes are audited as the user.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Verification ran git inside the tree under test, kept no command output and
treated every infrastructure fault as a test failure; repairs went through an
executor lease the coordinator should not hold; and a project without delivery
could never succeed. This reworks the worker execution path and the control-plane
contracts it depends on.
- Verification exports the exact commit to a directory without .git, installs
dependencies (network allowed) and runs the protected commands under
bubblewrap in kata mode or directly in host mode; evidence records exit code,
duration, digest, a redacted output tail and the isolation used. Production
rejects host evidence. A failed installation waits as infrastructure.
- Waiting reasons are an enum with a redacted detail; dispatcher, GitHub and
model-proxy states map onto it, and the console explains each one with a way out.
- Repairs are requested by the coordinator through /internal/runs/:id/repair;
the control plane derives the failure summary from the verifier's evidence and
enforces the repair budget. Continuing after the budget is spent grants one more
round; a new requirement revision starts a fresh budget.
- Execution identities may only move a run within their own stages and only to
running or waiting; success comes from integration evidence (no delivery
configured) or deployment acceptance. The unused preview stage is gone.
- Integration fast-forwards when the target has not moved, merges and re-verifies
otherwise, retries when a push finds the target moved, and turns merge conflicts
into a repair round that merges the current target for the agent to resolve.
- Successful runs that needed a repair leave a project lesson; active lessons are
injected into later prompts, and admins can list, add, disable and delete them.
- Executor progress (messages, commands, file changes, plan updates) is stored as
normalized events; previously agent messages were recorded as the literal word
"output". Provider failures keep the work as a checkpoint and wait as
provider_error instead of failing the run.
- Workers declare WF_SANDBOX_MODE=host|kata (host refused in production),
heartbeat with retries until the lease could have expired, and retry safe
control-plane reads with backoff.
- tests/local-loop.test.ts runs the loop end to end with real Git, the in-process
control plane behind its internal routes and a scripted agent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Drop the WorkBuddy Cloud executor stub: it always reported
"unverified" and could never run. WorkBuddy remains an MCP client for
submitting wishes. Providers are now codex and codebuddy; an unknown
provider waits with an explicit reason instead of a fake adapter.
- Remove internal routes nobody calls (/internal/releases/:id/begin,
/accept, /failure and /internal/workspaces/:id/provisioned) with
their domain methods, the never-consumed release.ready and
release.rollback outbox events, an unreachable idempotency branch,
dead helpers in runtime/deploy.ts and an unused RunnerBroker
dependency.
- Enable noUnusedLocals in the base and web TypeScript configs; the
runtime package now extends the base config.
- Add tests/tsconfig.json and include it in `npm run typecheck`. This
surfaced tests still calling the deleted begin/accept path (now
exercised through the Runner protocol) and five latent type errors.
- Web: provider capability labels match the API's keys and the wish
form disables unavailable providers.
- Delete the invalid example Runner Job manifest; stop tracking the
generated apps/web/next-env.d.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds prettier 3.9.8 (exact) with a shared config (single quotes,
120 columns, trailing commas), .prettierignore, .editorconfig and the
`format` / `format:check` scripts, then formats all TypeScript,
JavaScript, CSS, JSON and YAML sources.
Purely mechanical: no behaviour change. Typecheck passes, the vitest
suite and the 74 IDE node tests produce the same results as before
(socket-binding tests still cannot run inside this sandbox).
Previously the longest source line was ~3000 characters; reviewing the
following semantic changes now produces readable diffs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Imports the previously untracked working tree as-is so that the review
changes that follow (requirements -> design -> implementation) can be
reviewed as diffs and reverted if needed. No content changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>