Skip to content

fix(exec): print one MXTK-RESULT line on every path that reaches a verdict - #748

Open
MendixMau wants to merge 3 commits into
masterfrom
claude/loving-gates-hauc1n-w1-result-line
Open

MendixMau wants to merge 3 commits into
masterfrom
claude/loving-gates-hauc1n-w1-result-line

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

Direct lane (changes to skills/, bug-logs/, bin/, project-bin/, project-tests/, pipelines)

What changed and why (one paragraph): A program that drives project-bin/exec.sh had to infer the outcome from exit codes whose meaning differs per script; an outside review of v2026.11.12 reported an orchestrator that read exit 4 ("applied, gate passed, lint only") as a failure. exec.sh now prints one fixed line on every path that reaches a verdict: MXTK-RESULT exec verdict=<applied|applied-lint|applied-unverified|partial|restored|failed|refused> applied=<yes|no|partial|unknown> verified=<yes|no|skipped> lint_new=<N|unknown|blind|skipped|na> exit=<code>. It is built in one function and printed before each path's closing human lines, so it is never the last line. Purely additive: no exit code changes and no existing output line is changed or removed. Paths that never reach a verdict (usage errors, a missing .mpr, an abort under set -e) print no line, and the header says that no line means no verdict, never success. Restore paths that had no closing line of their own get one; it says "rolled back", "NOT rolled back" or "no rollback was attempted" according to what happened. A short pointer is added to skills/harness-architecture.md (on demand).

Impact

Row Answer
Process — human steps or gates added/removed; does anything new block; new stage artifacts none.
Dependencies — shared files touched; order vs other open PRs; new tools/platform assumptions; new artifact reads + their producer project-bin/exec.sh (additions only; four existing lines gain a trailing ; LINT_NEW=…), a new fixture, skills/harness-architecture.md, CHANGELOG.md. A later PR will rewrite the orchestrator contract section of the same skill on top of this one.
Context cost none: baseline 66,025 → 66,025 of 80,000; the touched skill is on demand.
Behaviour n/a: scripts only (the skill change is a pointer).
Runtime Measured on a real project, median of 3 on Linux: 20.5 s → 20.9 s for an applied script, 0.57 s → 0.49 s for a refused one: within run-to-run variation. Time cost: per exec · 0 s measured on a cloud Linux container · can force rework: n · offset: none needed

Field evidence — a fictional test app built with the toolkit on 2026-11-12 (Mendix 11.13, mxcli v0.28), real mxbuild gate. Old and new exec.sh on the same script: same exit code, and the output differs by exactly the one added line. Applied: MXTK-RESULT exec verdict=applied applied=yes verified=yes lint_new=blind exit=0. Refused on purpose (reference to an entity that does not exist): MXTK-RESULT exec verdict=refused applied=no verified=skipped lint_new=na exit=1. Fixtures: test-exec-result-line.sh 72 of 72 (stub-based; the line carries no tool output), and the existing exec fixtures unchanged: gate-retry 52, lint-diff 9, lint-autorestore 17, crash-rollback 13, hash-verify 49, gate-kind 32, lock-watch 104, all passing.

Independent review: MERGE-AFTER-FIX (verdicts failed and partial and the --patch paths untested; two paths disagreed when a restore itself fails; lint_new=na covered three different cases), fix round, MERGE-AFTER-FIX again (the new closing line said "restore" on two paths that never attempt one), fixed, then MERGE, no findings at 29ca2b78. Not run on macOS or Git Bash.

  • No client data anywhere in the diff
  • Size cap: 1 script (+about 60 lines), 1 new fixture, 1 skill pointer, CHANGELOG.md
  • Test tier reached: fixtures plus a before/after run on a real project with the real build gate
  • For a new/changed instrument: expected lines pasted from actual runs; layouts unaffected (no path logic touched); macOS and Git Bash considered, not run
  • For a new skill: n/a
  • CHANGELOG.md line appended in this PR, crediting the source
  • New bug entries: n/a

Generated by Claude Code

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
…stinct lint_new words, more cases

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
…ver attempted one

Review fix: on a partial run, and when mxbuild crashed with no baseline (write kept on purpose), the new closing line told the reader to restore the model, contradicting the text above it. It now says no rollback was attempted. The MXTK-RESULT line is unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
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.

2 participants