80 Commits

Author SHA1 Message Date
wishforge
9d9254f94d ✨ Stream the Copilot's answer and generate the Wiki's code layer
A customer waiting four seconds for a first word is a customer who thinks the
button did nothing. The Copilot now streams from the gateway (SSE, first text in
under a second in local tests) and can call eight read-only tools while it looks:
Wiki search, file listing, file read, code search, git log, git show, run
summary and logs. Fifteen calls per answer, and every call is audited by name and
argument hash, never by the code it returned.

Nothing a tool returns reaches the model unscrubbed: credentials, connection
strings, bearer tokens, private keys and high-entropy strings are replaced, and
a path that holds a credential is refused before it is opened. A model that
repeats its own instructions is caught too: any twelve characters of the system
prompt coming back verbatim turns the answer into the refusal script.

The Wiki gains a code layer it can generate by itself — overview, constraints,
flows and changes — committed under wiki/code/ and readable by customers. The
change log is rebuilt from the repository rather than appended, so it is safe to
run repeatedly. It refreshes after a wish is refined and after a wish is created;
the two pages that need the model are only written while they do not exist yet.
2026-11-09 10:09:47 -08:00
wishforge
a0701076dd fix(models): remove context suffix from cluster defaults and fixtures 2026-11-09 09:31:04 -08:00
wishforge
4fa6b9285c 🔊 Keep the executor CLI's last words, with secrets removed
Raw stderr never streamed into a run because it may carry credentials, but discarding it
left a stalled CLI completely silent — there was no way to tell "cannot reach the gateway"
from "still thinking".

The tail of stderr now goes to the worker log when a run fails, is canceled or never saw a
success, with both the CLI's credential values and the usual key/token shapes removed.
2026-11-09 04:13:33 -08:00
wishforge
2f08a615a0 ✨ Answer small talk and broad questions from the Wiki's own overview
A customer asking「你能帮我干啥」got "the snapshot is empty": retrieval matched nothing,
so only the entry page was sent, the model had no quote to give, and an ungrounded FAQ
answer was downgraded to "unknown" and counted as a missing page.

- retrieve() now falls back to the pages the entry page links to, and scores a page by
  the name the entry page gives it as well as by its own path and body
- greetings and capability questions are recognised and answered without demanding a
  quote, and are no longer written down as wiki gaps
- links from a customer page to a page they may not read are stripped from the text,
  so a module map cannot reach a prompt or a source list
- the system prompt speaks to a non-programmer customer: conclusion first, small talk
  gets two to four concrete suggestions, vague questions get clarifying options, project
  facts need a quote, and high-risk changes are handed to the platform
- an answer carrying a credential-shaped string is refused outright, with the gap left
  alone, and quickReplies carries clickable follow-ups (not rendered yet)
2026-11-09 04:11:45 -08:00
wishforge
aa4915b214 🔧 Offer gateway model names without the [1m] suffix in the project model catalog 2026-11-09 01:23:38 -08:00
wishforge
59238e5e82 🐛 Pass proxy settings to the executor CLI so runs reach a gateway behind a proxy 2026-11-09 01:23:38 -08:00
wishforge
3f8f3f925b 🐛 Pass proxy settings to the model CLI so gateways behind a proxy are reachable 2026-11-09 01:09:18 -08:00
wishforge
642f7d3cc0 ✨ Answer in production from the tenant model credential and name the model on every call 2026-11-09 00:14:53 -08:00
wishforge
6c054bcab0 ✨ Optimize every Copilot draft, honor a project budget, and record Wiki gaps 2026-11-08 23:35:21 -08:00
wishforge
34e221d880 🔒 Require verbatim Wiki citations and keep code paths out of customer answers 2026-11-08 23:00:20 -08:00
wishforge
ccd87cc23e ✨ Add the grounded project Copilot API over the Wiki snapshot 2026-11-08 22:36:06 -08:00
wishforge
e1194fbf8b ✨ Serve repository Wiki reads and let a server-held credential answer for the tenant 2026-11-08 22:35:31 -08:00
wishforge
bf721b84a7 🎨 Format source files and ignore local acceptance artifacts 2026-11-08 22:23:01 -08:00
eust-w
ee340d6a8b ✨ Raise default run token limit to 100M and max cap to 500M
Claude Code runs with cache reads count toward token budget and easily
exceeded the former 1M default and 10M cap. The default is now 100M
tokens and the maximum allowed cap is 500M.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-11-03 14:30:23 +08:00
eust-w
7dfd5b159c 🐛 Optimize wishes with flash instead of the coding model
AI optimization called Claude CLI with no --model, so it used
deepseek-pro and hit the 120 s limit. It now uses flash by default,
with 140 s, and WF_CLAUDE_ASK_MODEL can override it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-11-02 15:25:21 +08:00
eust-w
b672d16277 ✨ Let project settings fetch the gateway's models
The available-models checklist has a "get models" button. The control
plane asks the gateway's /v1/models with its own key and returns names
only, to owners and admins.

Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com>
2026-11-02 14:28:16 +08:00
eust-w
2c44c65ac1 ✨ Raise the CLI output limit to 256 MiB, and let it be configured
Wide wishes made Claude Code write more than 16 MiB of stream-json and
stopped at "executor failed". The limit is now maxOutputBytes, 256 MiB
by default.

Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com>
2026-11-02 13:36:53 +08:00
eust-w
97ee4467a3 🐛 Let the console import the model catalog without the contracts entry
The settings checklist pulled values from the contracts barrel, which
Turbopack cannot follow. The catalog now lives in its own entry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-11-02 12:21:26 +08:00
eust-w
b1f94302d7 ✨ Offer project models as a checklist, and default wishes to flash
Owners pick from deepseek-flash and deepseek-pro instead of typing names.
A wish uses flash when the project offers it, even if pro was listed first.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-11-02 12:10:38 +08:00
eust-w
35c00f076d 🧪 Do not hold a change to failures already on its branch
- Checks run in a repository of their own holding only the commit (and
  the commit the run started from, as refs/wishforge/base), so code that
  asks Git which commit it is gets the true answer; the verifier's
  repository and configuration stay out of reach
- A frontend test gets two minutes before it fails, instead of one that
  never settles holding the whole suite until the check is killed
- When frontend or Go tests fail, the same tests run at the commit the
  run started from; only failures that were not there before fail the
  change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 05:37:14 +08:00
eust-w
4cffd71be8 ✨ Learn project skills from runs, and export a wish's report
- Skills: per-project know-how the platform proposes from each succeeded
  run (in the background, or on request from a run), people confirm,
  edit, disable, delete or write; active ones enter later prompts
- Export one skill as SKILL.md, or all as a zip with a directory per
  skill, as .claude/skills/ expects
- A wish's report: every run, its stage timeline, the agent's plan,
  replies, commands, changed files and model usage, the change, the
  checks, failures, reviews and releases, and the full event log, as
  Markdown, or laid out for printing to PDF

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 03:57:24 +08:00
eust-w
6d615c0ffd ⚖️ Count cache reads a tenth toward budgets, and allow runs up to 10M tokens
- countedTokens: input, output and cache creation in full, cache reads a
  tenth, as they cost; the worker meters Claude CLI usage with it and the
  usage event says how much counted
- A run's token budget may be raised to 10,000,000

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 03:26:27 +08:00
eust-w
72085cf752 ✨ Let a project offer models and a wish choose one
- Projects list the models their wishes may run with, the first by
  default; owners and admins set them in the project settings
- A wish may choose one of its project's models; the choice is checked
  and pinned to the run, which shows it, and the executor starts the
  agent with it (--model), else with the agent configuration's
- Model names may be spelled as the model gateway does
  (deepseek-pro@latest[1m]), in projects and agent configurations alike

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 03:08:35 +08:00
eust-w
aa151d16f9 ✨ Deliver to Fanyu's cluster from the dev branch beside the POC
- Profiles pin each environment: POC (branch poc) and Fanyu (branch dev,
  180.76.138.88, droboticflow-fanyu), with their Deployments by UID
- Releases expect every Deployment of their profile; Fanyu's api image
  also runs its annotation processor and validator, each rolled back to
  its own image
- Bindings may list several projects; each Runner has its own settings
- fanyu-access: least-privilege identity and build-Pod admission policy in
  Fanyu's cluster, its token only in the executor and Fanyu's Runner
- projects --replace: delete every project with all it holds, then create
  the POC and Fanyu projects, their environments and Runners
- Ship the Runner's public keys in the ConfigMap, not a Mac path

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 17:47:47 +08:00
eust-w
c5a6c6160d 🚀 Deploy WishForge to the POC cluster, with check Pods and daily backups
- cluster-poc.mjs: image (in-cluster Kaniko), bootstrap, secrets, apply,
  migrate --rehearsal|--final, public HTTPS entry, backup and restore
- One restricted Pod (platform, executor, Runner, PostgreSQL, Temporal,
  MinIO, Caddy, backup) listening only on loopback except Caddy
- Protected checks run in per-workspace check Pods; cancellation during
  start-up now always removes them
- Daily snapshots on the node (consistent dump with row counts, Temporal
  online backup), copied to the Mac by launchd with SHA-256 checks and a
  notification on failure; restore verified on the rehearsal copy
- Downloads and uploads survive the Mac's lossy link to the cluster
- Local public entry, evidence isolation labels, acceptance records

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 16:27:07 +08:00
eust-w
addf330b10 ✨ Add account types and enforce per-user wish permissions
- Provide six account types and custom combinations of wish, code review,
  release and management permissions, applied on each authenticated request.
- Enforce frontend-only accounts when submitting, answering, widening and
  reverting wishes; require every contributor to have full access before
  skipping backend code review.
- Gate code review and release decisions by their specific permissions.
- Rework member management to create and edit account types, permissions and
  project access, and reflect those permissions throughout the console.
- Update the manual and architecture docs with permission tests and
  end-to-end coverage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-10-28 12:07:08 +08:00
eust-w
17553e2f8f ✨ Let a person widen a frontend-only wish to backend code
When the agent of a frontend-only wish asks to change backend code, or keeps
changing it until the repair rounds run out, the run details offer "改为前端和
后端并继续". It answers the wish with allowBackend: the run may change backend
code from the new requirement revision on, the agent reads that the scope
changed, and the timeline records who widened it. Whether a backend change needs
a review still depends on the submitter's backend permission. Only an answer to
a frontend-only wish accepts the flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 23:19:08 +08:00
eust-w
bf3313620e ✨ Let each wish stay frontend-only, and optimize wishes into short goals with choices
- Each wish says whether it may change backend code. A frontend-only wish is told
  which paths it must leave alone; a change to them goes back before any check runs,
  the platform puts those files back before the repair round, and the control plane
  never integrates them. A wish that may change backend code integrates directly for
  people with backend permission and waits for a code review otherwise.
- Owners and admins grant backend permission per person on the members page as well
  as per project in the project settings.
- AI optimization has its own button for the wish and for the criteria. It writes a
  wish of at most three lines (goal, scope, limits), keeps the details in checkable
  criteria, and asks only what the person must decide, as choices whose answers join
  the wish; suggested criteria are taken one by one.
- Lists, run titles, Feishu cards and pull request titles show a wish's first line;
  the run details show the rest.
- Changed paths no longer follow renames, so moving backend code into a frontend
  directory counts at both places for code review and for the frontend-only scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 20:37:30 +08:00
eust-w
44b1bee723 🐛 Treat POC images deployed by tag as of unknown source
Someone deployed the POC api and worker outside WishForge by mutable tags,
and every build then stopped with a raw validation error: the cluster
snapshot only accepted digest-pinned images.

A component running a tag is now of unknown source, as one set by hand
already was: the timeline names the component and its tag, the build makes
it again, and the release needs a person's approval. A release still deploys
digests only; what it replaces may be a tag of the same repository, and such
a release never declares itself rollback-compatible, since what the tag
pointed at may be gone. An image neither pinned nor tagged, or not of the
component's repository, stops the build with a message naming it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:58:42 +08:00
eust-w
a4eaefc69f ✨ Hold reviewed paths, take back runs, optimize wishes and notify in Feishu
What the pilot asked for, from its meeting:

- Code review: a project names the paths changes to which a person reviews
  before they reach the target branch (globs, with exceptions). After the
  checks pass, the verifier asks the control plane, and the run waits at
  integration until an owner or admin approves the exact commit; approving
  integrates it without repeating the checks, rejecting hands the comment to
  the agent as a new requirement. Continuing cannot get around it: the
  verifier asks again before every integration.
- Undo: "take back this change" starts a run that reverses what a run
  integrated on the current target branch, three-way, keeping later commits;
  only lines later commits changed too go to the agent. It then verifies,
  integrates and delivers like any run. Releases get a rollback button for the
  version live in their environment.
- Wish optimization: the local Claude account rewrites a draft wish and its
  acceptance criteria by built-in and project rules, with no tools at all;
  the person compares and decides, nothing is submitted for them.
- Release confirmation: an environment can make every release wait for a
  person, not only those the risk rules flag.
- Feishu notifications: a group bot is told of releases awaiting approval and
  changes awaiting review (mentioning the decision makers), runs that need a
  person, finished runs and failed releases; each once, signed when a secret
  is set, with text from runs never acting as card markup.
- Reviewers see the agent's change summary and who submitted the wish, and
  whether the checks ran in the macOS sandbox; the wish form offers only the
  executors this deployment can run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:08:27 +08:00
eust-w
e8f99f4b24 👥 Let each person sign in with an account of their own
Everyone used the one local administrator, so the system could not tell who
asked for a change, and anyone could approve anything. Owners and admins now
create accounts on a members page: a login name, a display name and a role,
with a password shown once. The control plane keeps only its scrypt hash, and
account creation is deliberately not replayable by idempotency key, so the
password is stored nowhere a replay could return it.

The console checks a password through a control plane route its proxy never
forwards from a browser, then calls the control plane with its local
credential plus the person's account and password version; those headers
count only together with that credential. Disabling an account stops it at
once, and resetting a password ends its existing sessions. A session that is
neither the administrator nor a valid account gets no credential at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:08:14 +08:00
eust-w
40a20f5dfb 🌐 Name timeline events in Chinese
The run timeline showed raw event kinds such as provider.file_change. Each
kind now has a Chinese label, with the raw kind kept in its tooltip; a kind
the console does not know is shown as it came.

The executor event kinds move to the import-free providers entry, so the
console's test can check that every kind has a label without pulling the
contracts entry into the browser bundle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:07:20 +08:00
eust-w
862a133f36 🌐 Name the reasons a release waits for approval in Chinese
The release page listed why a release needs approval as the control
plane wrote it, in English, while everything around it is Chinese, and
approving is the one decision there that a person has to make.

The reasons now live in the contracts package, in a module that imports
nothing, as the provider list does: the control plane gives them and the
console names each in Chinese, a protected change with its path. A
reason the console has no name for fails its type check; one it does
not know at all is shown as it came.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 11:32:08 +08:00
eust-w
9099f06ba8 🔒 Ask for approval on every image recipe and dependency manifest
A release counted as protected only a file named exactly Dockerfile,
the Node and Python manifests and the .github directory. The local POC
builds its images from Dockerfile.api, Dockerfile.worker and
Dockerfile.drosync-coordinator, and pins Go and Rust dependencies in
go.mod, go.sum and Cargo files: changing any of them was deployed
without approval wherever releases are preauthorized, and so were
changes to .dockerignore, *.dockerfile, Containerfiles and Gitea or
GitLab CI.

The rule now lives in the contracts package. Any Dockerfile or
Containerfile, the build context's ignore list, Compose files, every
dependency manifest and lock file the verifier knows, and the CI
locations need a person; the verifier's notion of a dependency manifest
is the same list. Ordinary source, tests and documents still go
through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 22:43:13 +08:00
eust-w
fb85c3fe2a 🐛 Weigh a POC release only by what it replaces
A POC release counted, besides what the target branch gained, the
changes since the commit every component runs. Worker and coordinator
keep their images while only web files changed, so they lag behind the
api, and every later release counted again the changes of releases the
api had long deployed: on the POC a run's classification listed the
previous run's test file, and an earlier change to a protected web file
would have asked for approval on every api-only release after it.

A component that keeps its image does not change; the release now
counts the changes since what the api and each component built again
run. pocComponentsToBuild says which commits those are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 21:14:47 +08:00
eust-w
f48ec5706f 🔥 Keep only recent source archives in the POC build directory
Every POC build left its source archive, about 30 MB, under
~/.local/share/wishforge/poc/builds, and nothing ever removed them;
nothing reads one once its build has ended either.

After a successful build, the archives of other builds older than an
hour are removed. Their build and release records and logs stay, a
build still uploading keeps its archive, and the newest archive remains
for the operator's sandbox check, which uses it by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 19:56:55 +08:00
eust-w
b201fd04a9 ✨ Wait for people when commits pushed to the target branch broke it
When a run's change passed its checks but failed one once merged onto
a target branch that moved meanwhile, the agent got a repair round for
it, even when the failure came from commits other people had pushed:
it would change their code, and spend rounds and tokens doing so.

The verifier now runs that check, recording no evidence, on the target
branch alone. If the branch passes, combining the two caused the
failure, and the agent repairs it as before. If the branch fails too
while the commit the run started from passes, the commits pushed since
broke the branch: the run waits on the new reason target_broken, uses
no repair round, and has its own verified change as its checkpoint
again. A run that started from a commit already failing the check may
be its fix, and is repaired as before.

Continuing merges the verified change onto the repaired branch and
checks the merge. An integration that continues reuses the change's own
verification under the same policy instead of repeating the checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 18:14:19 +08:00
eust-w
b5b5c49ec3 🐛 Checkpoint a merge candidate again: its worktree is no agent workspace
Since the Git config of an agent workspace is reduced to an allowlist
before each checkpoint, every checkpoint read `<workspace>/.git/config`.
A merge candidate is a worktree of the integration cache, whose `.git`
is a file, so the read failed with ENOTDIR: whenever the target branch
moved while a run was working, its integration stopped on an
infrastructure wait, and continuing failed the same way. No test merged
onto a moved target without a conflict.

A GitWorkspace now remembers the worktrees it added from a repository
WishForge owns and leaves their config alone; no agent can reach it. A
workspace whose `.git` someone else turned into a pointer file is still
refused rather than followed. Tests merge onto a target that moved
meanwhile, end to end and at the Git contract.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 18:03:43 +08:00
eust-w
821c059081 🐛 Give a blue-green candidate and a fresh switch time to settle
The Compose and Kubernetes adapters checked a candidate once. A
container that had started but did not listen yet made the request
throw, and the deployment was reported as of unknown state, to be
reconciled by hand; one stray error from the stable entry right after
the switch rolled a healthy release back.

The candidate checks and the checks after the switch are now repeated,
six attempts two to ten seconds apart, as the POC's already were, and
the Runner logs each repeat. A candidate that never answers is
reported as not switched, with the previous release still serving.
A missing address or missing checks are reported at once instead of
being asked again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:41:47 +08:00
eust-w
6722319314 🔒 Weigh a release by everything its environment does not run yet
A release's risk only counted what the target branch gained when the
run integrated. Commits people pushed to the branch directly, and
integrations that were never deployed, went out with the next release
without being classified: an environment preauthorized for automatic
release took a migration or a Dockerfile change pushed straight to the
branch without approval. The POC chose what to rebuild from the same
narrow diff, so worker and coordinator kept running old code; on the
local POC, WishForge had in fact only ever rebuilt the api.

The control plane now gives the verifier the commit of the release the
environment runs, and the classification covers everything between it
and the release, as well as what the integration brought. On the POC,
each deployment records the commit and the image a release put there.
The build plans from that snapshot, the one the release is checked
against: worker and coordinator keep their images only while what they
run differs from the source in web files alone. A component of unknown
source (never deployed by a release, restored by a rollback, or set by
hand, which leaves the annotations stale) is rebuilt, and the release
is marked partial: it needs approval and does not roll back on its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 16:44:13 +08:00
eust-w
8b2a8ca4fe 🐛 Build what a run integrated even after people pushed onto the poc branch
The POC build only accepted a source equal to the head of the Gitea
poc branch. Once someone pushed to poc after a run integrated, the
build failed, and so did every continue: a build stopped by a drop of
the link to the cluster could never finish if poc moved meanwhile, and
the run stayed waiting with an error that did not say why.

When poc has moved on, the build now fetches it and requires only that
its history contains the run's commit; it builds that commit and tells
the timeline that the newer commits deploy with a later run. A source
the branch lost to a rewrite is still never built: the run waits on
the repository with POC_SOURCE_REWRITTEN and says to cancel it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 16:43:12 +08:00
eust-w
d4ea7c7626 🔒 Reduce an agent workspace's Git config to a safe allowlist before trusted Git commands
The agent's file tools are confined to its workspace, and the
workspace holds .git. It could plant .git/config and .gitattributes
there, and the executor then ran trusted git add, diff, bundle and
merge in that workspace to export the checkpoint and start a repair
round. Git honours repo-local configuration for every command and no
environment variable disables it, so a planted clean or smudge filter,
diff or merge driver, core.fsmonitor or sshCommand, an include, or a
url.insteadOf transport rewrite would run as the worker: in the
development host mode, as the operator, outside any sandbox. The
driver names are the agent's to choose, so -c overrides cannot reach
them.

Before the checkpoint and before mergeTarget, .git/config is now
reduced to core basics, remote, branch and extensions, which is what a
clone needs to fetch, merge and bundle; everything else, the planted
drivers and includes among it, is dropped. It is redone each time,
since a paused run's agent could plant again before it resumes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:08:02 +08:00
eust-w
3623d318af ✨ Sandbox the local POC's protected checks and installations on macOS, by operator opt-in
In the development host mode, protected checks and dependency
installations ran directly as the operator. They run the agent's code:
a test it wrote could read the home directory's secrets, reach the
network, or plant Git configuration that the trusted Git commands after
it would execute.

With WF_HOST_CHECK_SANDBOX=true they run under Seatbelt instead. File
contents in the home directory are unreadable except the command's own
directory and the paths the operator lists; it may write only there,
in the caches the operator lists and in a temporary directory of its
own, never in a .git directory. Only installations reach the network;
checks may use loopback ports by opt-in, for test suites that start
local servers. The platform's own ports (control plane, Temporal and
its web UI, database, object storage, provisioner, Git service, IDE,
console) stay blocked in any case: the local start lists them from
their configured addresses. Checks get no answer from the keychain,
and a command whose home is the executor's (holding its credentials)
gets a private one. A sandbox that cannot start leaves the run waiting
on infrastructure; verification evidence records checkSandbox.

scripts/check-host-check-sandbox.ts checks all of this on the target
Mac, from outside the sandbox, then runs the POC's installation and
checks sandboxed on a recent droboticflow source. Enabled on the local
POC, a real wish passed through both, including a repair round for the
agent's own failing tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:10:47 +08:00
eust-w
92a06dd3b2 🐛 Repeat the POC acceptance checks a settling rollout can fail, and show every retry
The public checks after a POC rollout (health, readiness, the entry
page, the API build commit and the protected smoke checks) were each
made once. Just after a rollout the public address can still reach a
Pod that is shutting down, which answers with the old build commit, and
the link can drop: either failed a healthy release and rolled it back.
They now take up to six attempts, waiting 2 to 10 seconds; a release
whose checks never pass is still rolled back.

Retries were also silent: a build slowed down by a flaky link looked
stuck. Every repeat now says what went unanswered and when the next
attempt comes, in the run's timeline during a build and in the Runner's
log during a release. Requests and checks share one retry helper.

The third live test found kubectl cp and exec reporting a failed dial
as "error: dial tcp ...: connect: operation timed out", without the
"Unable to connect to the server" of get. That upload was not retried
and the build stopped; dial failures and connection timeouts now count
as unanswered, checked against the messages seen on the POC link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 05:06:46 +08:00
eust-w
56a845f53c 🐛 Ride out a flaky link to the POC cluster during builds and releases
In the 2026-10-26 POC run the Mac's link to the cluster API dropped
about once a minute. One unanswered kubectl call ended the whole build
twice, though the Kaniko Pod kept building, and each manual resume
re-ran the protected verification. The release path had the same
weakness with worse consequences: a dropped rollout watch counted as a
failed rollout and rolled a healthy release back.

Only requests that are safe to repeat are repeated, and only when the
cluster API left them unanswered (no connection, a broken connection,
kubectl hung), never when it refused them:

- Reads take up to six attempts, waiting 2 to 30 seconds between them.
- The builder looks its Pod up by its attempt-unique name before each
  create, adopting a Pod whose create answer was lost.
- A lost source upload is sent again. Unpacking runs once at a time,
  refuses an upload whose SHA-256 differs from the archive, and marks
  the context ready only when complete, so Kaniko never starts from a
  partial context; a damaged upload is sent again.
- A dropped rollout watch resumes for the rest of the rollout timeout.

Patches are still never repeated. A link that stays down longer still
stops the run as an infrastructure fault.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 02:25:34 +08:00
eust-w
fbcd273a08 🐛 Count the tokens of a stopped Claude Code session, and show its last message once
Claude Code and CodeBuddy report a session's usage only in their final
result. A session stopped before it (paused, canceled or out of time)
reported nothing, so its tokens never reached the run's budget or the
monthly plan: the paused session of the 2026-10-26 POC run was recorded
as 0 tokens, and repeated pauses could have spent without limit.

The adapter now adds up the usage each model response carries in the
stream, once per response although the CLI repeats it on every content
block, and reports that as the session's final usage when no total
arrives. The executor meters it like any final usage; the timeline
marks it as estimated, since the last response's output may be
undercounted.

The final result usually repeats the agent's last message word for
word, which the timeline then showed twice; it is now shown once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 02:24:42 +08:00
eust-w
5f32e4613e 🐛 Keep the output of stopped commands, and stop what commands leave running
- A check stopped at its time or output limit lost everything it had
  printed: the repair prompt only said that WishForge stopped it, not
  where it hung. The stop now carries the output so far, and the
  verification evidence and failed installations keep it, with the
  reason appended.
- A command that left a process running (a test's server, say) held
  its pipes open until the time limit and counted as hanging, and in
  host mode such processes stayed on the machine. A command now ends
  when its own process exits: the rest of its process group gets two
  seconds to drain the pipes and is then stopped, as is anything else
  it left running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 19:21:24 +08:00
eust-w
30369c1430 ✨ Save the agent's work before a run pauses
Pausing revoked the executor at once: the agent was killed and the work
of the current attempt stayed only in the executor's local workspace,
so continuing started that attempt over.

A pause of a run whose executor holds the lease now drains it first:

- The run keeps `running` with pauseRequestedAt (the console shows
  pausing). Its agent gets no model credential and no new model
  request; continuing is refused until the pause completes; cancelling
  still stops it at once.
- The executor learns of it from its heartbeat, stops the agent, saves
  a checkpoint with its live lease and completes the pause through
  /internal/runs/:id/pause. Continuing restores that checkpoint.
- The workflow is stopped only after the pause completes; stopping it
  earlier would abort the save. A model request interrupted by the
  stop no longer expires the pausing run's lease.
- If the executor does not complete it within two minutes, or stopped,
  the heartbeat, the next lease, the coordinator's wait or the
  background sweep pause the run anyway.

Runs no executor is working on still pause at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 18:38:06 +08:00
eust-w
1f7360075b 🐛 Keep deployments moving past stale releases and failed rollbacks
- The runner took the newest ready release and threw when it was
  stale, on every poll, so nothing else in the environment deployed.
  Polling now fails stale ready releases (canceled runs, revised
  requirements, changed code, configuration or approval), tells their
  runs, and deploys the next one. A paused run's release waits, since
  continuing may make it current again.
- A rollback the runner reported as failed stayed unknown and held the
  environment, which neither unlock nor another rollback could free. A
  definite failure now frees it; an unknown rollback can be unlocked by
  an owner or admin after checking the target, which cancels it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 17:32:16 +08:00
eust-w
9b2c8f14a9 🐛 Repair installations the agent's manifest changes broke instead of waiting
Every failed installation waited as an infrastructure fault. When the
agent's own change broke it (a misspelled package, say), continuing
installed the same manifests before the agent ran, failed again, and
the agent never got a turn: the run could not move without a new
requirement revision.

- The verifier attributes a failed installation to the checkpoint when
  it changed dependency manifests (package.json, go.mod, lockfiles and
  the like) and the output is not a network or registry failure. The
  evidence lists those manifests, and the control plane records an
  `install` failure that the next repair round fixes.
- A repair round for an `install` failure starts the agent even when
  the installation fails again, with that output in the prompt.
- Prompts, lessons and the run page name the failed installation.

Any other failed installation still waits for the environment, without
spending a repair round.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 17:32:16 +08:00