Commit graph

3284 commits

Author SHA1 Message Date
Scott Werner
cd9b0be393 Remove unnecessary installer warning regression test 2026-10-23 17:20:56 -04:00
Scott Werner
6ba50e0807 Keep installer tests focused on behavioral contracts 2026-10-23 16:32:19 -04:00
Scott Werner
e047a9adff Stop generating ignored run settings during browser installation 2026-10-23 16:10:25 -04:00
Scott Werner
b1b1306211 Declare text support in the dotted-provider regression fixture 2026-10-23 14:43:13 -04:00
Scott Werner
2d859496e2 Serialize generated provider overlays with the TOML library 2026-10-23 14:38:46 -04:00
Scott Werner
dee7dd1ddf Drop duplicate former-prefix hook scenario 2026-10-23 12:49:30 -04:00
Scott Werner
d9bedadfb0 Remove redundant setup graph projection test 2026-10-23 12:39:40 -04:00
Scott Werner
ab3b078154 Trim redundant preparation removal coverage 2026-10-23 11:55:10 -04:00
Scott Werner
a98d5be8ff Expect the settings source path in parser errors 2026-10-23 10:34:40 -04:00
Scott Werner
d374ef0ec1 Integrate Petri preparation removal and update admission checks 2026-10-23 10:30:54 -04:00
Scott Werner
0b38121930 Merge remote-tracking branch 'origin/main' into codex/remove-run-prepare 2026-10-23 10:07:20 -04:00
Scott Werner
4a5c89e5ba Distinguish skipped stages in CLI progress 2026-10-22 15:18:52 -04:00
Scott Werner
b452f498f5 Remove run preparation settings in favor of explicit commands 2026-10-22 15:01:03 -04:00
Scott Werner
d45464eb9b
Merge pull request #1055 from fabro-sh/fix/no-bare-selector-passthrough
Some checks failed
Rust / Clippy (push) Waiting to run
Rust / Test (macOS) (push) Waiting to run
Rust / Process titles (musl) (push) Waiting to run
Rust / Format (push) Waiting to run
Rust / Rustdoc (push) Waiting to run
Rust / Generated Docs (push) Waiting to run
Rust / Test (Linux) (push) Waiting to run
Rust / Sandbox providers (Docker) (push) Waiting to run
TypeScript / Typecheck (push) Has been cancelled
TypeScript / Test (push) Has been cancelled
TypeScript / Build (push) Has been cancelled
Reject bare provider names and unknown unpinned model selectors
2026-10-20 15:56:27 -04:00
Scott Werner
0e670e9234 Exempt ULIDs from entropy-based secret redaction
Fabro's run, session, turn, message and pair IDs are ULIDs. A ULID
occasionally has enough distinct characters to cross the secret
scanner's 4.5-bit entropy threshold, and the stream redaction then
rewrites the Web UI link to `/runs/REDACTED` and the run branch to
`fabro/run/REDACTED`. Two nightly releases in the last week failed on
`attach_replays_completed_detached_run` this way, and each fix so far
protected one field at a time.

Teach the entropy scanner the format instead: a token that is exactly
26 uppercase Crockford base32 characters and decodes to a timestamp
between 2020 and 2100 is an identifier, not a secret, and is left
alone wherever it appears. Trailing `-ULID`, `_ULID` and `=ULID`
segments are stripped before measuring, so `20261020-<id>` and
`<secret>-<id>` are handled, and the secret in the latter is still
found. The gitleaks credential patterns run on every token as before.

This mirrors detect-secrets' built-in UUID filter. A secret would have
to take exactly this shape and land in the date window to be missed,
which is about one in a hundred of the already rare tokens encoded as
26 uppercase base32 characters.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-20 14:51:14 -04:00
Scott Werner
14584bbc32 Reject bare provider names and unknown unpinned selectors
Fabro's shared resolver passed any unknown bare selector through verbatim
to the highest-priority ready provider. A provider name in the model field,
such as `gemini`, is not a catalog model, so it took that path and reached
Anthropic with wire model `gemini`. The same path turned any typo into a
request on whichever provider happened to win priority.

An unqualified unknown selector is now an error. Passthrough of an
uncatalogued model id still works, but only with a provider pin, which is
also how the operator docs already described it. A bare provider name gets
a dedicated error that names the provider and says to pin it and omit the
model to use its default.

The completions endpoint returns that error as a 400 before any provider
call; the models lookup returns it as a 404. Session creation keeps its
own provider-name message and no longer passes unknown unpinned names
through either. The OpenAPI description of `CreateCompletionRequest.model`
no longer advertises a provider id as a selector, and the TypeScript client
is regenerated from it.

Closes #950 by rejecting the input rather than resolving it: a provider
name in the model position is ambiguous with model aliases, and no
comparable library resolves it to a provider default.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-20 13:16:51 -04:00
Scott Werner
7ff4456b54
Merge pull request #1038 from fabro-sh/codex/docker-worker-cleanup
Stop retained sandboxes after abnormal worker exit
2026-10-16 13:42:42 -04:00
Scott Werner
bf1e14654c Bound dump fixture event volume and verify hydrated output 2026-10-16 08:15:34 -04:00
Scott Werner
0d7dae01f0 Preserve protected JSON fields during secret redaction 2026-10-16 08:15:34 -04:00
Scott Werner
55d3d3dec5 Stop retained sandboxes after abnormal worker exit 2026-10-15 12:39:36 -04:00
Scott Werner
daf82929a0 Adopt Petri skill expansion boundaries 2026-10-14 17:34:34 -04:00
Scott Werner
ac84eccfcc
Merge pull request #1034 from fabro-sh/codex/run-client-headers
Some checks are pending
Rust / Clippy (push) Waiting to run
Rust / Rustdoc (push) Waiting to run
Rust / Generated Docs (push) Waiting to run
Rust / Format (push) Waiting to run
Rust / Test (Linux) (push) Waiting to run
Rust / Sandbox providers (Docker) (push) Waiting to run
Rust / Test (macOS) (push) Waiting to run
Rust / Process titles (musl) (push) Waiting to run
Restore run session headers using scoped model clients
2026-10-14 16:21:13 -04:00
Scott Werner
e12a6633b7 Include stall fixture in workflow inventory snapshot 2026-10-14 13:27:17 -04:00
Scott Werner
8780cb1bf6 Scope run model clients with session headers 2026-10-14 12:44:52 -04:00
Scott Werner
560687e76b Restore graph-wide stall watchdog in Fabro execution 2026-10-14 11:20:00 -04:00
Scott Werner
10e0884079
Merge pull request #1024 from fabro-sh/codex/run-git-identity
Propagate run Git identity to commands and agents
2026-10-13 13:46:11 -04:00
Scott Werner
d5b5435c11
Merge pull request #996 from fabro-sh/preserve-subagent-usage
Some checks failed
TypeScript / Typecheck (push) Has been cancelled
TypeScript / Test (push) Has been cancelled
TypeScript / Build (push) Has been cancelled
Rust / Format (push) Waiting to run
Rust / Test (macOS) (push) Waiting to run
Rust / Clippy (push) Waiting to run
Rust / Rustdoc (push) Waiting to run
Rust / Generated Docs (push) Waiting to run
Rust / Test (Linux) (push) Waiting to run
Rust / Sandbox providers (Docker) (push) Waiting to run
Rust / Process titles (musl) (push) Waiting to run
Keep subagent usage when an agent stage completes
2026-10-12 16:12:20 -04:00
Scott Werner
04addf9204
Merge pull request #1026 from fabro-sh/codex/settings-migration-permissions
Preserve Unix file permissions during settings migrations
2026-10-12 16:07:28 -04:00
Scott Werner
9e0e356112 Fail the umask permissions test when its child runs no tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:49:46 -04:00
Scott Werner
81d63a0683 Track Petri's root usage breakdown by model
Bump Petri to the commit that reports `pebble.usage_by_model`, the root
session's usage by the route that spent it, and add an end-to-end test:
an agent stage on a scripted model whose primary answers once and then
fails mid-prompt keeps every token Petri reported, and files the
primary's share and the fallback's share under their own models.

Only Petri moves; Pebble and sandbox-driver stay at their locked
revisions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:38:02 -04:00
Scott Werner
20d8e8235a Preserve Unix permissions on settings migration files 2026-10-12 13:53:39 -04:00
Scott Werner
e09a08f1bb Point refused sandbox cleanup at the force option
A run whose sandbox cleanup fails is kept for a retry, and only an explicit
force deletes it without its sandboxes. Say so in the 409 so a caller with a
run stuck behind an unavailable provider knows how to proceed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 13:46:57 -04:00
Scott Werner
a2ca338514 Preserve completed run results when sandbox cleanup fails 2026-10-12 11:39:52 -04:00
Scott Werner
dc30d9c1fa Propagate run Git identity to commands and agents 2026-10-10 08:53:50 -04:00
Scott Werner
d6f1ab87c0 Keep subagent usage when an agent stage completes
A finished agent stage replaced its live usage, which included every
subagent session, with the parent session's usage alone, so completed
stage and run totals dropped descendant tokens and spend. The subagent
accounts were also read as an array, while Petri reports them as an
object keyed by session id, so no per-model rows were ever built.

The completed stage now totals the parent's usage and each descendant
account once, and builds per-model rows for the parent and every
descendant. The parent's usage goes under the routes Petri reports in
`pebble.usage_by_model` when present (lithoscomputer/petri#110), and
under the stage's model until then.

Fixes #933

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:57:59 -04:00
Scott Werner
e9c35911bb Require finalization for every Fabro run
FabroHooks always declares required run finalization instead of only
when the run publishes or checkpoints. Every run takes one path, the
best-effort diff branch in run_finished goes away, and a fork always
declares what its worker's hooks will declare on resume, so the fork no
longer carries its source's flag across.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 12:08:28 -04:00
Scott Werner
b8281d6c1f Settle managed runs through one rule
ManagedRun::settle owns the rule that a run's first terminal status
sticks, and the lifecycle fold, the finish settle, fail_managed_run and
the in-process finish all go through it. One release_managed_run
replaces the two helpers that released a run's live state and also
frees its scheduler slot. The engine reads the finish through the
projection's finished_status, so a cancelled finish carrying a
checkpoint failure, and a failed publication, are mapped in one place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 11:59:19 -04:00
Scott Werner
04309977e5 Commit checkpoint failures through required finalization
A failed checkpoint cancels the run, so Petri recorded it as cancelled
and the worker overrode its own outcome in memory. Runs that checkpoint
now declare required finalization, and finalize_run rejects with
checkpoint_failed before publishing. The projection and the engine
outcome report a cancelled finish carrying that failure as a workflow
failure with the checkpoint's message, and the in-memory override is
gone. A run whose checkpoint failed is never published.

Retry a host failure that storage rejects with a short backoff, so a
brief storage fault does not leave the run active and holding its
scheduler slot. A failure that never commits still leaves the run's
status alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 11:00:01 -04:00
Scott Werner
b4aea6128d Tidy host failure handling and restore main's lockfile versions
Share the managed-run cleanup between persist_run_failure and
fail_managed_run, return the committed projection from
commit_host_failure, and keep the run's status when the failure cannot
be stored. Restore the cancelled-launch message and keep the spawn
error's cause in the launch failure.

Rebuild Cargo.lock from main with only the Petri bump so the Windows
crates stay on their newer versions. Import the projection module
rather than the function, wrap long tracing calls, and document the
finalization test fixture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:38:10 -04:00
Scott Werner
af41c7c66c Simplify required run finalization
Name the publish failure once, settle host failures through one flat
helper, share the append-then-finish path for in-process runs, reuse
the source state already read when checking a fork, and drop the
unused finished-run status shim.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:45:25 -04:00
Scott Werner
599b674ec1 Build required publication on Petri main's finalization
Track Petri main now that required run finalization has merged there,
read workflow execution from the engine state, resume the failed-publication
regression with its admitted workflow, and keep the worker lifecycle helper
usable for rejected appends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:45:25 -04:00
Scott Werner
3443a923c0 Carry required publication into fork declarations
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:45:25 -04:00
Scott Werner
59f9088b04 Preserve committed outcomes during host failure cleanup
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:45:24 -04:00
Scott Werner
21d4db6766 Commit publication failures through required run finalization 2026-10-08 12:45:24 -04:00
Scott Werner
d3d8893bf9 Bind Petri scenario servers to OS-assigned ports 2026-10-08 10:33:38 -04:00
Scott Werner
fa688cad50
Merge pull request #934 from fabro-sh/codex/macos-dry-run-timeout
Some checks failed
Rust / Clippy (push) Waiting to run
Rust / Process titles (musl) (push) Waiting to run
Rust / Test (macOS) (push) Waiting to run
Rust / Format (push) Waiting to run
Rust / Rustdoc (push) Waiting to run
Rust / Generated Docs (push) Waiting to run
Rust / Test (Linux) (push) Waiting to run
Rust / Sandbox providers (Docker) (push) Waiting to run
TypeScript / Typecheck (push) Has been cancelled
TypeScript / Test (push) Has been cancelled
TypeScript / Build (push) Has been cancelled
Skip question polling for auto-approved CLI attach
2026-10-07 17:29:00 -04:00
Scott Werner
8b773cdd00
Merge pull request #788 from chunga-ict/fix/schema-mismatch-error-message
Explain schema mismatches as a version skew
2026-10-07 16:33:03 -04:00
Scott Werner
ee86a497d5 Update runner test for schema mismatch diagnostics 2026-10-07 16:21:51 -04:00
Scott Werner
e1932f2c42 Preserve the cause of schema mismatch errors 2026-10-07 16:07:59 -04:00
Scott Werner
c5f0296e1a
Merge pull request #905 from fabro-sh/petri-no-jump
Drop the jump route kind from the Petri stream reader
2026-10-07 10:50:46 -04:00