Skip to content

Gate the scored loop behind an autoresearch feature - #141

Open
wseaton wants to merge 2 commits into
mainfrom
engine-autoresearch-feature
Open

wseaton wants to merge 2 commits into
mainfrom
engine-autoresearch-feature

Conversation

@wseaton

@wseaton wseaton commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Adds an autoresearch cargo feature to the crucible crate, off by default. Without it the binary is the playbook workflow engine (plan, check, deploy, build, flow, fetch); the keep/discard loop, scope, rank-grounded, watch-pr and loop-states are not built, and a bare crucible --manifest exits with an error naming the feature.

Shared code moves out of runloop first so the plan lane has no dependency on it: iteration_template to plan::template, the gate self-test to cli::selftest, and fetch_object with the URI helpers to object_store. The control bridge and the Reporter layer move into their own modules (control::bridge, report::reporter) so each gate is one cfg on a module.

Release binaries, the runtime images and just build-loop build with the feature, because the controller runs crucible scope and rank-grounded in pods. CI's existing all-features clippy/nextest cover the feature-on set; two added steps clippy and test the engine on default features. The lib the controller links is unchanged.

Checked: clippy -D warnings both ways; cargo test -p crucible default (684 lib, 309 bin, integration green) and with the feature (684 lib, 647 bin, integration green); modgraph zero-cycle for both crates; controller builds; examples/playbook runs on the default build; scripts/state-docs.sh --check passes.

The engine binary shipped the optimization loop, scoping, grounded
ranking and PR watching to every user, though a playbook run touches none
of it. With the new `autoresearch` cargo feature off (the default) the
binary is the playbook workflow engine: plan, check, deploy, build, flow
and fetch. A bare `crucible --manifest` refuses with a message naming the
feature instead of running.

Shared machinery moves out of runloop so the plan lane no longer reaches
into it: iteration_template to plan::template, the gate self-test to
cli::selftest (crucible check runs it), and fetch_object with the S3/file
URI helpers to object_store (the controller shells crucible fetch). The
control bridge moves to control::bridge and the Reporter layer to
report::reporter, so each gate is one cfg on a module.

Release binaries, the runtime images and CI build with the feature on,
since the controller runs crucible scope and rank-grounded in pods. CI
also clippies and tests the engine on default features so neither set
rots. The library the controller links is unchanged.

Assisted-by: Claude
@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown

Docs preview for this PR is built and attached as the docs-preview artifact.

Download docs-preview, unzip, and open index.html in a browser.

Rebuilt for b7abe1f.

…eature

# Conflicts:
#	.github/workflows/ci.yml
#	.github/workflows/release.yml
@wseaton
wseaton enabled auto-merge September 23, 2026 01:48

This branch has not been deployed

No deployments
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.

1 participant