Slice 4e: beta activation wiring — config/env-driven fleet mode arming (#398 amicissimo) - #857
Merged
Merged
Conversation
…tion's hub getter (#398) Slice 4e: the activation gap recorded by the Slice A/B casts — extension.ts never passed the fleet option — is closed, config/env-driven: - fleet_activation.ts: resolveFleetActivation — config fields + env overrides (AMICODE_FLEET_HUB_URL / AMICODE_FLEET_TUNNEL_ALIAS / AMICODE_FLEET_TUNNEL_CONFIG) -> armed (hub URL + tunnel alias + posture tuning) or NOT armed with a NAMED reason. Both fields required (D7: the tunnel stamps its own config — an activation without an alias cannot stamp one). NO activation config -> the fleet option is never passed -> byte-identical base (the H3 discipline extends to activation, by test). - amicode_service_wiring: startAmicodeService assembles the fleet option from the armed activation — the hub getter LATE-BOUND (re-resolved per request, so a de-armed activation is the honest upstream absence, never a stale snapshot), the D6 posture tuning and D7 tunnel config path passed through. Not-armed is a named boot-log outcome. - extension.ts: the workspace settings (amicode.fleetHubUrl, fleetTunnelAlias, fleetTunnelConfigPath, fleetOverlaySource + the four posture tuning keys, 0 = the fixture default) feed the resolver. - Posture tuning is config-overridable with defaults equal to today's fixture values — no behavior change unless configured. TDD: test/fleet_activation_398.test.ts (13) — activation resolution, named not-armed reasons, env precedence, tuning defaults/overrides, wiring byte-identity, staging still gates, late-bound getter, posture end-to-end. Refs harmoniqs/amicissimo#398.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…to-end (#398) Slice 4e: the DRY/LIVE smoke harness for the local-shell data plane, run through the REAL wiring (startAmicodeService — the activation path the previous commit wired), bundled from this repo's own source (the boot-probe convention, no transcribed logic): pnpm --filter amicode run smoke:fleet DRY (default, fixtures only — this run is the AC evidence, 10/10): - A: no-entitlement boot → the activation-armed-but-unentitled service is byte-identical to base over a 6-request spot check; fleet paths answer the base no-route 404 (the fleet mode does not exist). - B: entitlement + lawful manifest + activation config → fleet mode arms; /amicode/fleet/status answers (staged provenance, hub credential); /amicode/fleet/sessions returns the merged projection — both stores, provenance-tagged, hub the store of record, currency over [hub, local]. - C: the kill/hang/rejoin legs against a fixture hub spawned locally — kill → 2 no-responses → hub-down posture (pointer surfaced) routing LOCALLY; the projection names the hub absence; rejoin → recovery re-enters fleet, refetch_epoch bumps; hang → CLIENT-enforced timeouts (400 ms) → hub-down, recovery holds hysteresis. The wedged-tunnel case is never welded (D6). - D: revocation mid-flight → the entitled write is delivered first; the hub 401s the next one → failed + read-only-with-pointer + Go-Standalone; the base posture keeps running (content never eaten, never a wedge). LIVE (AMICODE_FLEET_SMOKE_LIVE=1): the machine's REAL entitlements + overlay source + activation config against the REAL hub through the REAL tunnel — staging, status, the merged projection, and the D7 tunnel stamp (named skip without AMICODE_FLEET_TUNNEL_CONFIG). Destructive legs are NEVER run live — named skips, not silent absences. Every failure line names its outcome; exit 1 on any leg failure; the hub credential env var is restored; DRY touches nothing outside a temp dir. Refs harmoniqs/amicissimo#398.
…proves (#398) FLEET_BETA.md: the seven items a beta tester provisions (entitlement, overlay source, hub URL, tunnel alias, tunnel config path, hub credential, posture tuning), the absent-config-means-byte-identical-base rule, the DRY/LIVE smoke invocations, and a per-leg table of what each leg proves. Refs harmoniqs/amicissimo#398.
aarontrowbridge
marked this pull request as ready for review
September 7, 2026 00:55
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.
Summary
Closes the activation gap recorded by the Slice A/B casts:
extension.tsnever passed the fleet option tocreateAmicodeService— the wiring option and the staging log line existed, but nothing supplied the hub getter. This slice makes the fleet overlay testable end-to-end, beta-scoped.Part of harmoniqs/amicissimo#398 (parent #380, sub-spec
spec-20260905-193000-local-shell-data-plane).What landed
fleet_activation.ts—resolveFleetActivation: config fields + env overrides (AMICODE_FLEET_HUB_URL/AMICODE_FLEET_TUNNEL_ALIAS/AMICODE_FLEET_TUNNEL_CONFIG) → armed (hub URL + tunnel alias + D6 posture tuning) or NOT armed with a named reason. Both fields required (D7: the tunnel stamps its own config — an activation without an alias cannot stamp one). NO activation config → the fleet option is never passed → byte-identical base (the H3 discipline extends to activation, by test).startAmicodeServiceassembles the fleet option from the armed activation: the hub getter late-bound (re-resolved per request; a de-armed activation is the honest upstream absence, never a stale snapshot), posture tuning + tunnel config path passed through; a not-armed activation is a named boot-log outcome.amicode.fleetHubUrl,fleetTunnelAlias,fleetTunnelConfigPath,fleetOverlaySource+ the four posture tuning keys,0= the fixture default) feed the resolver.Follow-ups in this slice (pushed as they land)
AMICODE_FLEET_SMOKE_LIVE=1)Verification
pnpm run typecheckcleantest/fleet_activation_398.test.ts(13) green — activation resolution, named reasons, env precedence, tuning defaults/overrides, wiring byte-identity, staging still gates, late-bound getter, posture end-to-endVerification (final)
pnpm run typecheck— clean, repo-wide (4/5 workspace projects, exit 0).test/fleet_activation_398.test.ts— 13/13 green (RED first: module-absent collection error, quoted in trail).Full extension vitest suite (
vitest run --passWithNoTests --exclude '**/slow/**'): 2697 passed | 4 failed | 53 skipped — the 4 are the known pre-existing set (terminal.test.ts×2 OPENCODE_DB/CONFIG_DIR env,editable_diffs_wiring.test.ts×2 mask-image/overflow), matching the clean-main baseline. The recursivepnpm -r run testalso surfacedpackages/amico-runagent_spawn.test.ts×1 ($AMICO_AGENT_CONFIG_DIRoverride) — verified pre-existing on a pristineorigin/mainworktree (same 1 failed | 39 passed).The DRY smoke harness run in this worktree (the AC evidence):
CI rollup on this PR: all green — boot-smoke ×3 (macos-14, ubuntu-24.04-arm, ubuntu-latest), app-shelf-boot-proof, app-bundle-gate, bundle-build-gate, schema-roundtrip, vsix-gate, fast.
Design decisions
hub_upstreamsurface, not a new schema/API/storage field — the freeze validator's envelope is untouched.entitlements/entitlementConfigDir/overlaySource) for test/harness injection; production leaves them undefined = the machine's real resolution.