AgentXchain v2.151.0
v2.151.0 is an architectural-fix release over v2.150.0. It ships the
BUG-59 full-auto gate closure coupling — approval_policy is now wired into
the governed phase-advance path so a project that configures auto-approval rules
actually closes routine human-approval gates without operator input, while
credentialed gates (publish, deploy, send money) hard-stop on human approval
even against a catch-all auto_approve rule. It also ships the
BUG-54 startup watchdog default raised from 30s to 120s after Turn 137's
measurement of 113s first-stdout on a 17,737-byte dispatch bundle, confirmed
independently by a tester stdout_attach_failed at running_ms: 30285 on real
tusq.dev full-auto. Closure of BUG-59 and BUG-54 still requires tester-quoted
shipped-package output on [email protected] per discipline rules #12 and
#13.
Bug Fixes
-
BUG-59 approval_policy ↔ phase-advance coupling: The full-auto product promise now actually holds end-to-end. Prior to this release,
requires_human_approval: trueon a phase-exit gate unconditionally paused the run, regardless of whatapproval_policysaid — the policy subsystem was orthogonal to the gate evaluator.v2.151.0couples them at the state-machine layer:cli/src/lib/governed-state.js::reconcilePhaseAdvanceBeforeDispatch()now consultsevaluateApprovalPolicy()when the gate evaluator returnsawaiting_human_approval. If a rule matches withaction: 'auto_approve'and conditions are met (gate_passed,roles_participated,acceptance_criteria_all_pass,verification_outcome, etc.), the reconcile path advances the phase directly, writes atype: 'approval_policy'ledger entry matching the accepted-turn path atgoverned-state.js:4909-4919, and emitsphase_enteredwithtrigger: 'auto_approved'. If the gate is taggedcredentialed: true,evaluateApprovalPolicy()hard-stops withreason: 'credentialed gate — policy auto-approval forbidden'before any rule evaluates — a catch-allauto_approverule cannot override. Puregate-evaluator.jsstays untouched perDEC-BUG59-KEEP-EVALUATOR-PURE-001. -
BUG-59 credentialed-gate hard-stop in approval-policy: New
isCredentialedGate(config, gateId)predicate incli/src/lib/approval-policy.jsreadsconfig.gates.<id>.credentialed. BothevaluatePhaseTransitionPolicy()andevaluateRunCompletionPolicy()short-circuit torequire_humanwith a stable"credentialed gate — policy auto-approval forbidden"reason string (so audit-log greps are reliable) before any rule is considered.when.credentialed_gate: falseis the documented valid predicate — it asserts the gate is NOT credentialed as a defensive precondition on a rule. The positive formwhen.credentialed_gate: trueis rejected at JSON Schema- normalized-config validation time (slice 2), so an operator cannot configure an ambiguous "auto-approve this credentialed gate" intent.
-
BUG-59 config schema + normalized-config validation:
cli/src/lib/schemas/agentxchain-config.schema.jsonnow carriesgates.<id>.credentialed: booleanand a structuredapproval_policy($defs.phase_transitions,$defs.rules[],$defs.run_completion,$defs.when) withwhen.credentialed_gate: boolean, enum: [false].cli/src/lib/normalized-config.jsrejects non-booleancredentialedon gates and rejectswhen.credentialed_gate: truewith a diagnostic that referencesDEC-BUG59-CREDENTIALED-GATE-PREDICATE-NEGATIVE-ONLY-001. -
BUG-59 default approval_policy in generated configs + enterprise template:
cli/src/commands/init.jsgenerated governed configs now ship an explicitapproval_policyblock:planning -> implementationauto- approves whengate_passed: trueandroles_participated: ['pm']withcredentialed_gate: false;run_completionauto-approves whengate_passed: true,all_phases_visited: true, andcredentialed_gate: false. All routine gates default tocredentialed: false.qa_ship_verdictnow carriesrequires_verification_pass: trueso auto- approval only fires when verification evidence is present. The enterprise template (cli/src/templates/governed/enterprise-app.json) carries the same shape; projects declaring apublish_release/production_deploy/send_paymentsgate MUST mark itcredentialed: trueperDEC-BUG59-GATE-ACTIONS-NOT-POLICY-AUTO-APPROVED-001. -
BUG-59 template-manifest whitelist:
VALID_SCAFFOLD_BLUEPRINT_KEYSincli/src/lib/governed-templates.jsnow includesapproval_policy. Without this, the packaged enterprise-app template validator rejected the new default blueprint with "scaffold_blueprint contains unknown key "approval_policy"", breaking packaged-scaffold initialization. Surface caught bytest/claim-reality-preflight.test.js. -
BUG-54 startup watchdog default 30s → 120s (
36e7805e): The local CLI adapter'sstartup_watchdog_msdefault is raised to 120,000 ms. Turn 137 measured first-stdout at 113,094 ms for a 17,737-byte realistic dispatch bundle under Claude Opus 4.7 on a clean dev box; a tester ontusq.devfull-auto independently hitstdout_attach_failedatrunning_ms: 30285under the old default. Per-run and per-runtime overrides (AGENTXCHAIN_*env vars andruntimes.<id>.startup_watchdog_ms) are preserved. Operators with faster setups can still lower the threshold explicitly.
Decisions
DEC-BUG59-APPROVAL-POLICY-GATE-COUPLING-001— BUG-59 full-auto gate closure is implemented as a layered governed-state contract, not by moving policy into the pure gate evaluator.DEC-BUG59-RECONCILE-POLICY-COUPLING-001—reconcilePhaseAdvanceBefore Dispatch()is the second site afterapplyAcceptedTurn()whereevaluateApprovalPolicy()is consulted onawaiting_human_approval.DEC-BUG59-CREDENTIALED-GATE-HARD-STOP-001— credentialed gates hard-stop insideevaluatePhaseTransitionPolicy()andevaluateRunCompletionPolicy()before any rule is considered.DEC-BUG59-CREDENTIALED-GATE-PREDICATE-NEGATIVE-ONLY-001—when.credentialed_gate: falseis the only documented valid predicate value;trueis rejected by schema + normalized-config validation.DEC-BUG59-SCHEMA-NEGATIVE-GUARD-001— JSON Schema and normalized-config both rejectwhen.credentialed_gate: truebefore a policy evaluation can reach it.DEC-BUG59-KEEP-EVALUATOR-PURE-001—cli/src/lib/gate-evaluator.jsstays a pure structural predicate; policy + state-machine context live ingoverned-state.jsandapproval-policy.jsonly.DEC-BUG59-AT-LABEL-UNIQUE-PER-FILE-001—AT-<area>-<NNN>test labels are per-file unique; slice-1 duplicateAT-AP-009labels were renamed toAT-AP-013/AT-AP-014in slice 4.DEC-BUG59-GATE-ACTIONS-NOT-POLICY-AUTO-APPROVED-001— gates with release/deploy/publishgate_actionsare human-approval automation boundaries and should be markedcredentialed: true.DEC-BUG59-IMPL-SLICE-SCOPE-001— BUG-59 implementation was split into four reviewable slices (policy primitives, schema + normalized-config validation, reconcile-path policy coupling, defaults + beta scenario + spec/docs).
Operator Notes
- Routine vs credentialed gate classification is now a first-class
config decision. Before running
agentxchain run --continuousunattended, tag every gate that protects an external irreversible action (npm publish,kubectl apply,gcloud run deploy, payment transfer) withcredentialed: true. Routine phase-exit gates (PM signoff, QA ship verdict on internal work) staycredentialed: falsesoapproval_policycan close them when conditions are met. approval_policyis the autonomy surface.--auto-approveremains a runtime blanket override for one-off human-interactive sessions.approval_policyis the durable project posture that survives across runs and makes full-auto behavior reviewable in the config.qa_ship_verdictnow requiresrequires_verification_pass: truein init-generated configs. Auto-approval only fires when verification evidence is present on the accepted QA turn. Operators upgrading fromv2.150.0configs should addrequires_verification_pass: trueto theirqa_ship_verdictgate if they want the full-auto closure path.- Startup watchdog default is now 120 s. Operators on fast local
subprocess setups can lower
runtimes.<id>.startup_watchdog_msto keep the old 30s fail-fast behavior. Projects hittingstdout_attach_failedatrunning_msnear 30000 should NOT need to raise it anymore.
Tester Re-Run Contract
Run the shipped package, not the source tree:
BUG-59 full-auto gate closure (new)
Configure a governed project with approval_policy auto-approval on
qa -> launch (or run_completion) with credentialed_gate: false, then:
agentxchain init --governed
# Run full-auto: PM -> dev -> QA -> launch, no human approval
agentxchain run --continuous --vision .planning/VISION.md --max-runs 1
The run must advance through qa -> launch (or to run_completion) with
zero unblock / approve-completion calls. Quote the phase_entered
event with trigger: 'auto_approved' and the ledger entry
type: 'approval_policy'. Negative path: mark the QA ship gate
credentialed: true, same run — the gate must still block on human with
smoke_probe-free diagnostic credentialed gate — policy auto-approval forbidden in the approval-policy evaluation.
BUG-54 startup watchdog threshold (new default)
Run 10 consecutive local_cli dispatches across PM/dev/QA roles on the real
failing environment. Quote adapter diagnostic lines including
startup_latency_ms, elapsed_since_spawn_ms, first_output_stream,
watchdog_fired. On v2.151.0, watchdog_fired MUST be false on at least
9 of 10 dispatches at the default threshold (no config overrides).
All prior shipped-package closure contracts remain in force
- BUG-52 phase-gate reconciliation — full four-lane coverage; quote
phase_enteredwithtrigger: 'reconciled_before_dispatch'ortrigger: 'auto_approved'(the new BUG-59 path that resolves BUG-52's third variant). - BUG-53 continuous auto-chain —
session_continuation <prev> -> <next> (<objective>); session status staysrunningbetween runs, ends ascompletedoridle_exit, neverpaused. - BUG-55 checkpoint completeness + verification outputs — quote
git status --shortafteraccept-turn+checkpoint-turn(must be clean). - BUG-56 probe-based auth preflight — Claude Max + no env auth + no
--baremust passconnector check/connector validate/ governedrun; a hanging shim must fail witherror_code: "claude_auth_preflight_failed"andsmoke_probe.kind: "hang".
Evidence
- node --test cli/test/beta-tester-scenarios/ cli/test/claim-reality-preflight.test.js → 228 tests / 68 suites / 0 failures / 5 skipped
- node --test cli/test/beta-tester-scenarios/bug-59-full-auto-gate-closure.test.js → 2 tests / 2 pass (positive + credentialed-negative command-chain)
- node --test cli/test/approval-policy.test.js cli/test/reconcile-approval-policy.test.js cli/test/normalized-config-credentialed-validation.test.js cli/test/e2e-approval-policy-lifecycle.test.js → 48 tests / 0 fail (slice 1-3 coverage)
- cli/src/lib/governed-templates.js whitelist fix gate: node --test test/template-validate.test.js test/template-spec-consistency.test.js → green after
approval_policyadded toVALID_SCAFFOLD_BLUEPRINT_KEYS.
Status
- BUG-59: full-auto gate closure coupling shipped. Closure requires
tester-quoted shipped-package output on
[email protected]showing (a)trigger: 'auto_approved'on routine gate closure + (b) credentialed- gate block with policy-evaluation diagnostic. - BUG-54: startup watchdog default raised to 120,000 ms. Closure
requires tester-quoted
>90%success across 10 consecutive PM/dev/QA dispatches on the failing environment at the new default. - BUG-52 / BUG-53: the BUG-59 coupling is expected to resolve BUG-52's
third-variant (
qa_ship_verdict+launch_readywith no pending object) as a side-effect. Tester verification required. - BUG-55 / BUG-56: closed on prior releases. Regression coverage carried.
- BUG-60 perpetual continuous policy: NOT shipped in
v2.151.0. Sequenced after BUG-59 tester verification per HUMAN-ROADMAP.
v2.151.0 does not flip any HUMAN-ROADMAP checkboxes on its own. BUG-59 and
BUG-54 close only after tester-quoted shipped-package output lands.