Repository navigation
fix(native): wait only for active services at native up - #314
Merged
Merged
Conversation
…mands A warm, image-only, unrouted `up` or `restart` with no hooks now runs four directory-xattr storage proofs instead of six. Each proof is three fresh helper containers. - The warm enrollment tail (no new volume) reuses the effect-entry proof of the same generation under the same lease. It uses the existing adjacentProof record, which needs a byte-identical material binding, so any receipt write in between forces a full proof. - Finalization skips the second proof pass when there is no route, after hook, or new or saved file material. In that case the completion step only reads. Proof reuse stays within one command and one lease. Nothing is persisted, so every command still opens with a full proof. Each performed verification proof now emits a passive `storage.proof` phase-trace span. The hosted native-config-compose scenario uses it to assert four proofs on each of two consecutive warm ups. Refs: HACK-1123 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sed file The HACK-1211 experiment produced two iterations per Bun version: one focused pass and one full `bun test` that started on a 600 s estimate and overran the 30-minute budget, because the full suite takes 30-35 minutes on hosted macOS. - Never start an iteration whose estimate exceeds the remaining budget. The estimate is a conservative prior (focused 120 s, full 2400 s) until a run completes, then the longest completed run times 1.2. A command that does not fit is recorded once in summary.json `skippedForBudget` and leaves the rotation. Deadline stops remain a safety net (`overrun`). - Add `--mode=focused|full|alternate` (default focused: only tests/native-https-owner.test.ts) and `--role=baseline|candidate`. - The workflow gains a validated `mode` dispatch input; the label-triggered matched pair uses focused with baseline/candidate roles. Full mode needs a budget of at least 40 minutes. The job timeout stays budget + 15. - summary.json gains per-command counts (iterations, passes, crashes, other failures, overruns, skipped-for-budget) and a one-line verdict such as "baseline 0/97 focused crashes". - The shared classifier also treats exit 134 (SIGABRT) and 138 (SIGBUS) as crash exits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Native `up` emitted a `--ready` goal for every compose service, including
services in profiles that were not selected. The runtime does not schedule
inactive services and refuses readiness for them ("Readiness includes
inactive or unknown services."), so any project with an unused profile
failed with graph_readiness.
Build readiness goals only for services the reviewed plan marks active,
and ignore dependency edges declared by inactive services so they cannot
raise an active service's goal. The runtime refusal stays as a guard; a
contract test now proves it still rejects inactive and unknown services.
Bridge pool capacity keeps counting inactive routed services: it is sized
before the profile-aware review and must remain an upper bound.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
Add a source CLI regression for a first up with new file material and no saved file material: finalization keeps its completion step, the second finalize pass, and the post-completion file-mount readiness check. The test fails when the retirement condition keeps only the saved-files arm. Native-compose CLI harnesses now give the child a private HOME under the fixture root instead of the contributor's HOME. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicted files: none. The plain merge applied cleanly; no generated files needed hand resolution, and the generation and reference tests pass on the merged tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicted files: none. The plain merge resolved automatically. This PR's change set (native readiness goals, the bridge capacity comment and the project_contract.rs guard test) does not overlap witness reuse or merge train 2. Regenerated plugins and docs/reference/cli.md were byte-equal to the merged tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-parents onto next after the previous stacked PR squashed in; next's tree equals a889387, which this branch already contains, so the branch tree is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A HACK-1163 acceptance run on the M3 (
nextat ccf526c) found that nativeuprefuses withgraph_readinesswhen the compose file has a service in a profile that is not selected.Cause:
readiness()insrc/backends/native-project-start.tsemitted--readyfor every compose service.src/backends/native-project-input.tsdoes not filter by profile, which is correct, because the review needs the whole file. The runtime then skips inactive services inGraph::from_plan(packages/runtime-core/src/project/execution.rs) and refuses with "Readiness includes inactive or unknown services."Change
readiness()is now the exportednativeReadinessArgs({ specs, plan, initializers, routed }). It emits goals only for services that the reviewed plan (review.report.plan.services[name].active === true) marks active.depends_onedges declared by inactive services are ignored. Before, an inactive service withdepends_on: { web: { condition: service_healthy } }could raise an activewebtohealthy. That fails the same way whenwebhas no healthcheck.Bridge pool capacity (
native-project-routing.ts): kept as isnativeBridgeCapacitycounts routed services in inactive profiles on purpose. I left that unchanged and added a comment that gives the reason:runtime upand before the profile-aware review, so profile activation has not been decided yet. Duplicating compose profile and dependency activation in TypeScript would create a second source of truth.reviewedNativeRoutesrefuses when the number of active routes is more than the capacity. Counting every declared route guarantees the floor is never too small, whatever the selected profiles are.Validation
bun test tests/native-project-start.test.ts tests/native-project-routing.test.ts tests/integration-ownership.test.ts: 74 pass, 0 fail.startNativeProjectwith injected runners (no Docker, OrbStack or real HOME): without a profile, onlyweb=startedis emitted, there is noadmin=autoroute slot, and bridge capacity is still 1. Withprofiles: ["debug"], the review receivesdebugand the goals becomeadmin=healthy,web=healthyandworker=started, with theadmin=autoroute slot.true(the old behaviour) makes the unit test and the no-profile startup test fail.execution_dependency_compiler_refuses_readiness_for_inactive_or_unknown_servicescontract test provesGraph::from_planstill refuses goals for an inactive profile service (tools) and for an unknown service (ghost) withgraph_readiness, and accepts the active-only set.RUSTUP_TOOLCHAIN=1.97.1 bun run check:local(fmt and clippy-D warnings) andbun run test:local: all green (985 pass in the main suite, 0 failures).bun run --cwd packages/cli typecheck: 0 errors.bun run --cwd packages/cli check: 0 errors, and the existing warnings are not in the changed files.Gaps
upon the M3 against a real project with an unused profile. This PR proves the argument construction and the runtime guard in isolation, not end-to-end runtime behaviour.bun run testor hosted CI locally.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.