agentxchain 2.155.31 → 2.155.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentxchain",
3
- "version": "2.155.31",
3
+ "version": "2.155.32",
4
4
  "description": "CLI for AgentXchain — governed multi-agent software delivery",
5
5
  "type": "module",
6
6
  "bin": {
@@ -4701,29 +4701,51 @@ function _acceptGovernedTurnLocked(root, config, opts) {
4701
4701
 
4702
4702
  const gateSemanticMode = config.gate_semantic_coverage_mode || 'strict';
4703
4703
  if (uncoveredFiles.length > 0 && gateSemanticMode === 'strict') {
4704
- const coverageError = `Gate "${exitGateId}" is failing on ${uncoveredFiles.join(', ')}. Your turn did not modify ${uncoveredFiles.length === 1 ? 'that file' : 'those files'}. Either edit the file(s) to satisfy the gate, or remove the phase transition request.`;
4705
- transitionToFailedAcceptance(root, state, currentTurn, coverageError, {
4706
- error_code: 'gate_semantic_coverage',
4707
- stage: 'gate_semantic_coverage',
4708
- extra: {
4709
- gate_id: exitGateId,
4710
- uncovered_files: uncoveredFiles,
4711
- declared_files: [...declaredFiles],
4712
- gate_reasons: preGateResult.reasons,
4713
- },
4714
- });
4715
- return {
4716
- ok: false,
4717
- error: coverageError,
4718
- validation: {
4719
- ...validation,
4720
- ok: false,
4704
+ // BUG-81: In planning phase only, auto-strip the phase transition request
4705
+ // instead of permanently blocking. PM's partial planning work is preserved;
4706
+ // the phase stays in "planning" and the continuous loop re-dispatches PM to
4707
+ // complete gate artifacts. In implementation+ phases, gate failures still
4708
+ // reject — dev/qa claiming readiness without updating gate files is a real error.
4709
+ if (turnResult.phase_transition_request && state.phase === 'planning') {
4710
+ emitRunEvent(root, 'gate_transition_request_auto_stripped', {
4711
+ run_id: state.run_id,
4712
+ phase: state.phase,
4713
+ status: state.status,
4714
+ turn: { turn_id: currentTurn.turn_id, role_id: currentTurn.assigned_role },
4715
+ payload: {
4716
+ gate_id: exitGateId,
4717
+ uncovered_files: uncoveredFiles,
4718
+ declared_files: [...declaredFiles],
4719
+ rationale: 'Turn did not modify gate-required files; phase transition stripped to preserve partial planning work',
4720
+ },
4721
+ });
4722
+ delete turnResult.phase_transition_request;
4723
+ // Fall through — continue with acceptance without the phase transition
4724
+ } else {
4725
+ const coverageError = `Gate "${exitGateId}" is failing on ${uncoveredFiles.join(', ')}. Your turn did not modify ${uncoveredFiles.length === 1 ? 'that file' : 'those files'}. Either edit the file(s) to satisfy the gate, or remove the phase transition request.`;
4726
+ transitionToFailedAcceptance(root, state, currentTurn, coverageError, {
4727
+ error_code: 'gate_semantic_coverage',
4721
4728
  stage: 'gate_semantic_coverage',
4722
- error_class: 'gate_coverage_error',
4723
- errors: uncoveredFiles.map(f => `Gate "${exitGateId}" is failing on "${f}". Your turn did not modify that file.`),
4724
- warnings: [],
4725
- },
4726
- };
4729
+ extra: {
4730
+ gate_id: exitGateId,
4731
+ uncovered_files: uncoveredFiles,
4732
+ declared_files: [...declaredFiles],
4733
+ gate_reasons: preGateResult.reasons,
4734
+ },
4735
+ });
4736
+ return {
4737
+ ok: false,
4738
+ error: coverageError,
4739
+ validation: {
4740
+ ...validation,
4741
+ ok: false,
4742
+ stage: 'gate_semantic_coverage',
4743
+ error_class: 'gate_coverage_error',
4744
+ errors: uncoveredFiles.map(f => `Gate "${exitGateId}" is failing on "${f}". Your turn did not modify that file.`),
4745
+ warnings: [],
4746
+ },
4747
+ };
4748
+ }
4727
4749
  }
4728
4750
  }
4729
4751
  }