Repository navigation
Conversation
Z3-backed neurosymbolic check (rules as data) that proves a task's done/teardown/merge claim consistent with prime directives #2 and #3. Hard rules gate; soft rules score. Wired into fm-teardown.sh and fm-merge-local.sh; fails open when the solver is absent so the existing bash checks remain the hard guarantee.
Replace the neurosymbolic_evaluator dependency with a small self-contained Z3 shim (axes -> EnumSort, hard rules -> Implies, per-rule SAT check for named violations, deterministic soft scoring). The only dependency is now z3-solver (public PyPI), so the gate is portable with no private coupling. Behavior and the JSON/CLI contract are unchanged.
Report COMPLETENESS_GATE: available when python3 can import z3, add a z3 install resolver (pip install z3-solver), and document it alongside TASKS_AXI. Mirrors the optional-capability pattern: silent and never blocking when absent, since the gate fails open.
…k and strict exit-3 enforcement
|
Thanks for the PR. Wheelhouse found that this branch currently has a merge conflict with the base branch, so it is stepping out of the maintainer queue for now. Please rebase on or merge the base branch into your branch, resolve the conflict, and push the result. Once GitHub reports the PR as mergeable again, Wheelhouse will resurface it for maintainer review. Conflict noted for firstmate#81 at |
|
Quick reminder: this PR still looks blocked on a rebase or merge conflict fix. If you are still interested, please rebase onto the current base branch, resolve the conflict, and push. If I do not hear back, I may close this as inactive. |
|
I am closing this because it has been waiting on a rebase or merge-conflict fix since 2026-07-01, and I have not seen a comment or push since then. If you still want to keep working on this, please reopen it or open a new PR and mention this one. Happy to take another look when there is an update. |
Device-run evidence (Appium suite green)The pipeline cannot produce this evidence itself:
|
Staging results (rule-5 hostile pass, 2026-10-24)Real adk-agent image beside the real staging
Prod rollout (firstmate + captain; nothing here is applied by CI)No caller needs labelling: every Odoo web pod already carries
Any caller that is not an Odoo web pod (a CronJob, a one-off Job) would need the label or a second Follow-ups noticed (out of scope)
|
* fix(spawn): stop pasting the brief through the pane shell on herdr First-attempt spawns on the herdr backend failed the agent-up gate five consecutive times on 2026-08-13/2026-08-14 - three cursor, then two claude. Every pane showed the launch line sitting in a plain shell with the brief spilled behind it as quote continuation, so the launch never ran as a command and no agent started. The same tasks came up within seconds on the one-line file-pointer relaunch the refusal already prints as its recovery, six of six, across both harnesses. The gate was right and is unchanged. What was wrong is what the launch typed: until an agent owns the pane, the launch line is shell input, and it carried the whole encoded brief as its prompt argument - a multi-kilobyte, multi-line paste (this repo's own scaffold renders about 10KB across about 95 lines) in which every newline is a submit into whatever reads the pane. On herdr the launch line now carries a one-line pointer at the brief file instead, and the agent reads it. The choice is a backend decision, so every adapter keeps its own verified launch template and only the brief argument changes; kimi, whose launch line cannot carry a brief at all, gets the same pointer as its separate post-launch delivery. The pointer is still built through the canonical operational-input encoder, so the agent still receives typed launch-brief input. Every other backend, tmux included, is unchanged. spawn_brief_pointer becomes the single owner of the pointer text, shared with the printed recovery, and answers to kind so a secondmate is not told it is in a task worktree. The refusal message stays accurate for the shape it describes. Regression coverage extends tests/fm-spawn-agent-up.test.sh: its fake herdr CLI can now model a healthy endpoint and records each send-text payload verbatim, and the new cases assert the exact bytes typed for claude, cursor, and kimi. Confirmed to fail against the pre-fix script. * no-mistakes(review): Fix pointer-delivery failure diagnostics * no-mistakes(document): Captain: document herdr pointer delivery
Corrections après la revue Codex de
|
| # | Constat | Correction |
|---|---|---|
| 1 | Le lanceur suivait le lien fm-inbox-stub et écrasait sa cible |
prepareRecette() applique la garde complète à l'environnement prévu avant toute écriture. Le dossier neuf n'est créé qu'après acceptation, de façon exclusive. La doublure est remplacée par renommage, sans jamais ouvrir l'entrée existante. Le lanceur refuse les variables qu'il fixe lui-même (MC_DB_FILE, FM_*, MC_REFINE_*, MC_DISPATCH_*, TELEGRAM_*_FILE) s'il les hérite de l'environnement. |
| 2 | Un lien à l'intérieur de FM_HOME laissait la doublure écrire dans le foyer protégé |
L'arborescence de FM_HOME ne doit contenir ni lien symbolique ni fichier à plusieurs liens physiques. |
| 3 | La protection de la base dépendait du nom du chemin et du HOME substitué |
La base, ses compagnons (-wal, -shm, -journal, .lock) et son dossier .backups doivent être des fichiers ordinaires à un seul lien. Le dossier de la base réelle est protégé à la fois depuis le compte (userInfo) et depuis HOME. |
| 4 | resolve() avant realpath() masquait lien/.. |
Les chemins sont pris littéralement : absolus, normalisés, sans lien symbolique. Les adaptateurs reçoivent exactement les chemins vérifiés (verifiedEnvironment). |
| 5 | Le guide Windows recommandait encore le démarrage manuel et un 4391 non gardé | Résultats marqués historiques. Les essais d'arrêt et de mauvais port se font sur l'instance de recette gardée, sans toucher à l'instance quotidienne. Les autres mentions de démarrage manuel sont retirées (README, windows/README). |
Exigence du capitaine : toute configuration incomplète, ambiguë ou désignant des données réelles est refusée avant tout effet de bord. S'y ajoutent PORT invalide et un TELEGRAM_*_FILE existant, désormais refusés.
Preuves
npm run typecheckpropre,npm run buildpropre,npm test: 1 634 réussis, 1 ignoré.tests/recette.test.tscouvre en régression chaque contournement de la revue, plus deux matrices de refus « sans effet de bord » (instantané octet par octet du monde, aucun dossier temporaire créé, victime liée intacte) :- une sur
prepareRecette, 21 cas ; - une sur la garde seule.
- une sur
- Scripts A, B et C de la revue rejoués sur le dist :
- tous les contournements sont refusés ;
victimOverwritten: false;- 0 entrée dans le
stateprotégé.
- Matrice de refus sur le serveur compilé, 13 cas : exit 1, monde inchangé, aucun appel à l'inbox, 0 requête Telegram.
- Bout en bout, en contraste : sans la garde, 15
getUpdates; en mode recette, 0 requête Telegram et une note dans la doublure. Le lanceur, lancé avec le HOME réel, ajoute 0 entrée dans l'inbox réelle.
…pin 4.9.8 (kunchenguid#81) After a pin bump, install refused to replace ~/.local/bin/peekaboo because it pointed into an earlier version's directory. It now treats a link into ~/.local/lib/peekaboo/<other-version>/peekaboo as its own: it verifies and unpacks the new release first, switches the link in one rename, then removes the old version directory. Any other file or link is still refused. Tests read the pin from the script instead of hard-coding it.
What Changed
bin/fm-completeness-check.sh,bin/fm-completeness.py,bin/fm-completeness.rules.json) that proves each task's done/teardown/merge claim consistent with the directives, wired intofm-teardown.shandfm-merge-local.sh; it fails open when the solver is absent and is controlled byFM_COMPLETENESS_GATE(off-switch) andFM_COMPLETENESS_STRICT(enforce-when-broken).fm-bootstrap.shas an optional capability (COMPLETENESS_GATE: available), emitted only whenpython3can importz3.tests/fm-completeness.test.shand synced README/CONTRIBUTING/AGENTS docs.Risk Assessment
✅ Low: The change is well-bounded, both prior-round findings are correctly fixed, and the new gate faithfully mirrors the bash safety checks it guards (verified across local-only, non-local-only, absent-worktree, and squash-to-fork cases) while failing open when the solver tooling is absent.
Testing
Baseline test suite (tests/fm-completeness.test.sh) passes all 15 assertions with z3 4.15.2 present, exercising the solver tier rather than just the fail-open stubs. I then captured operator-visible CLI transcripts showing the gate's actual verdict lines for every hard invariant (SAT vs BLOCKED with the named violated directive rule), plus fail-open/strict/off-switch behavior and the two fixes in the latest commit (strict exit-3 enforcement and the absent-worktree non-false-block). Finally I drove the real fm-merge-local.sh against a sandbox local-only repo to prove the directive-#2 wiring changes actual git state only after captain approval is asserted. No UI surface is involved — this is a CLI/lifecycle gate, so CLI transcripts and persisted git state are the appropriate end-user evidence. Working tree left clean; all sandboxes removed.
Evidence: Completeness gate verdict transcript (SAT/BLOCKED across all invariants)
Evidence: Fail-open, strict enforcement, off-switch, and the two latest-commit fixes
Evidence: End-to-end: real fm-merge-local.sh refused without approval, fast-forwards main with approval
Evidence: Test suite result (15/15 pass, solver tier active)
Pipeline
Updates from git push no-mistakes
⏭️ **intent** - skipped
✅ No issues found.
🔧 **Rebase** - 1 issue found → auto-fixed ✅
AGENTS.md- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
bin/fm-completeness-check.sh:83- When the worktree directory is absent, git_unlanded_facts sets LANDED=none, which trips the SHIP_REQUIRES_LANDED hard rule (forbid landed=none) and blocks ship teardown (exit 2). This diverges from fm-teardown.sh, which guards its unlanded check withif [ -d "$WT" ]and skips it entirely when the worktree is gone, allowing teardown. On z3-installed setups this false-blocks legitimate cleanup of a task whose worktree was already removed/returned (e.g. an interrupted prior teardown). Resolve the absent-worktree case to a non-blocking state (treat 'nothing on disk to discard' as landed/clean) to match the bash semantics it mirrors.bin/fm-teardown.sh:428- The wired callers only treat gate exit code 2 as a refusal (if [ "$gate_rc" = 2 ]). Under FM_COMPLETENESS_STRICT=1, fail_open exits 3 to signal 'refuse on broken tooling', but both fm-teardown.sh:428 and fm-merge-local.sh:52 fall through on exit 3 and proceed. This makes strict mode silently ineffective at the exact call sites it is meant to harden, contradicting the documented enforce-when-broken guarantee. Halt on exit 3 as well (or treat any non-zero gate exit as a stop).🔧 Fix: fix completeness gate absent-worktree false-block and strict exit-3 enforcement
1 info still open:
bin/fm-completeness.py:119- prove_consistency() is defined and documented in the module docstring as the check that the whole hard rule set is satisfiable over free axes, but check()/main() never call it. As a result a self-contradictory pair of hard rules in fm-completeness.rules.json would go undetected — every concrete claim would then be reported UNSAT (blocked) with no signal that the rule data itself is broken. Either wire it into check() (e.g. surface a distinct 'rules inconsistent' error so the wrapper fails open) or drop the unused function and its docstring reference.✅ **Test** - passed
✅ No issues found.
bash tests/fm-completeness.test.sh— all 15 assertions pass including the solver-dependent tier (z3 4.15.2 importable)Operator-visible verdict transcript viabin/fm-completeness-check.shacross the full invariant matrix (ship landed/unlanded, scout with/without report, merge with/without approval, graded compliance score)Fail-open (FM_COMPLETENESS_RULES=/no/such.json-> exit 0), strict enforcement (FM_COMPLETENESS_STRICT=1-> exit 3), off-switch (FM_COMPLETENESS_GATE=0-> exit 0)Latest-commit absent-worktree fix:--gate teardown --idagainst synthetic meta whose worktree path does not exist -> SAT (no false block) for both no-mistakes and local-only modesEnd-to-end real-script wiring:bin/fm-merge-local.sh demo-1on a sandbox local-only git repo — refused (main unchanged) without approval, fast-forwarded main to the change withFM_CAPTAIN_APPROVED=granted✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.