Repository navigation
Conversation
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported teardown issue is fixed by refusing adapterless endpoint records before destructive cleanup, with regression coverage confirming that metadata and worktree state are preserved. Reviews (3): Last reviewed commit: "no-mistakes(document): correct cleanup-v..." | Re-trigger Greptile |
|
Speaking as Kun's firstmate: First look on HEAD Contract-class: new-default. Auto-detect gains a new always-on winner when First-time fork CI: diff-reviewed (backend detect/validate/docs/tests; no workflow writes; refuse paths look deliberate). Approved pending workflow runs for this tip. Full CI/attestation not yet visible post-approve — waiting-ci. VISION: One captain — aligns (honest refuse vs silent degrade). Authority — mixed (experimental detect is ambient). Scripts — aligns. Restart — aligns (preserve records). Delegation — aligns. Fleet outlives vendor — aligns (another harness surface). Scope — aligns (runtime backend, not workshop). Security: no workflow mutation; endpoint refuse before teardown — FYI only (not a captain card while CI pending). Stamp waiting-ci new-default. Waiting on CI/attestation, not on the captain yet. |
|
Speaking as Kun's firstmate: Correction on the same tip Contract-class: new-default unchanged. CI 34074312040 is in progress post-approve, but the natural path is waiting-author until attestation MATCH. Not a captain card. |
|
Thanks for the quick triage, and for catching the mismatch. That mismatch was real when you checked. It has since resolved: the pipeline updated the attestation after its CI step pushed the fix commit, so the body and the tip now agree. Current state on
On re-pushing. The problem is that What I think is needed instead: approve the queued The visible red check is the earlier run from the window before the attestation caught up. One note on the description. I corrected two paragraphs that described Your new-default read matches mine, by the way. Auto-detection is ordered last precisely because a Paseo-hosted firstmate leaks |
83bfa92 to
fcf9224
Compare
fcf9224 to
cafe2af
Compare
|
Speaking as Kun's firstmate: tip moved on fork PR #3884 (aminry). Head Attestation: MISMATCH — body marker still binds Contract-class: new-default (unchanged). Auto-detect gains an always-on winner when VISION.md per-rule
CI/NM: Tip fork runs approved this pass after diff review: CI Security: no workflow mutation; endpoint refuse before teardown — FYI only while not otherwise ready (not waiting-captain). |
|
Speaking as Kun's firstmate: tip CI on Contract-class: new-default unchanged — no auto-merge. Natural path remains waiting-author until attestation MATCHES this tip. Not a captain card while mismatch holds. Firstmate flag: no. |
… lifecycle code Stage 1 of the experimental Paseo runtime backend: the backend name, its runtime detection, its refusals, and its endpoint-record validation, with no lifecycle adapter at all. bin/backends/paseo.sh, endpoint creation, capture, send, and kill are deliberately absent, so every runtime operation refuses through the existing unimplemented-backend arms instead of degrading. - FM_BACKEND_KNOWN and FM_BACKEND_SPAWN gain paseo; an unknown backend name still refuses exactly as before. - fm_backend_detect selects paseo from PASEO_AGENT_ID or PASEO_TERMINAL_ID, checked LAST, after $TMUX, HERDR_ENV and both cmux signals. Verified live: a tmux pane spawned by a Paseo-hosted firstmate carries both markers, and only $TMUX names the layer actually executing, so any earlier check would misroute that whole fleet. PASEO_CLI is deliberately not a marker - the Paseo CLI shim exports it into everything it touches. - fm_backend_name prints the herdr/cmux-shaped auto-detect notice and names which of the two Paseo markers won. - fm-spawn refuses --secondmate on paseo, for the same reason as cmux and Orca: fm_backend_agent_state has no paseo arm, so the liveness sweep would have to guess. It also refuses endpoint creation while the adapter is absent, rather than falling out of the case with no target. - fm_backend_validate_task_endpoint gains a paseo arm that requires the endpoint_task_id binding and cross-checks window= against paseo_workspace_id and paseo_terminal_id, so a malformed, foreign, truncated, or ambiguous record is preserved and refused. It is metadata-only, so daemon reachability can never change the verdict. - fm_backend_required_tools declares treehouse only. Paseo is session-provider-only, but its transport-specific delta waits for the adapter, and the Paseo CLI shim is reached through $PASEO_CLI rather than PATH, so declaring it here would report a spurious missing tool. - tests/fm-backend-paseo.test.sh covers registration, detection ordering including every both-markers case, the secondmate and endpoint-creation refusals, and metadata validation. It runs with no Paseo installed and includes a tripwire proving validation never invokes Paseo. - tests/lib.sh scrubs the ambient Paseo markers so no suite's result depends on which desktop app launched the developer's terminal. The backend ships with no per-harness restriction. Documentation describing it as usable, the version gate, and the daemon-reachability gate all belong to later stages.
…-invalid guidance
… identity). CI and "Require no-mistakes" were NOT code failures: both runs are action_required with 0s duration, never executed, awaiting workflow approval. REAL DEFECT, mechanism confirmed independently: fm_backend_kill (bin/fm-backend.sh:822) has no paseo arm and falls through to the "no kill implementation" catch-all. Every teardown call site swallows that failure (bin/fm-teardown.sh:3273, :3202, :2881, all "2>/dev/null || true") since an already-gone endpoint is legitimately not an error. The pre-existing per-field paseo validation therefore ACCEPTED a well-formed record, authorizing teardown to return the worktree, delete durable metadata, and report completion while the Paseo terminal was still running, destroying the endpoint's only durable identity. FIX (removal-first, smallest root-cause change): deleted the accepting per-field paseo branch in fm_backend_validate_task_endpoint and replaced it with an unconditional refusal naming the missing lifecycle adapter. Validating the shape of a record nothing can act on was the unrequired path; hardening it would leave the same hole. Matches the stage's existing posture, since paseo already refuses at fm_backend_validate_spawn for the same reason. Per-field shape checking lands with the adapter. Shared helpers fm_backend_endpoint_atom_valid and fm_backend_meta_exact_value remain used by other backends, so nothing was left dead. REGRESSION PROOF: reverted bin/fm-backend.sh to the committed version and re-ran. Both new tests fail pre-fix ("not ok - a backend=paseo endpoint record must refuse...", "not ok - paseo endpoint without a lifecycle adapter: teardown unexpectedly succeeded") and pass post-fix. The teardown test drives real fm-teardown.sh end to end. A second test pins the general invariant by driving both real functions across FM_BACKEND_KNOWN: no backend may pass cleanup validation without a reachable fm_backend_kill. FOUND BEYOND THE REVIEW COMMENT: the fix silently falsified recorded verification evidence in docs/verification/runtime-backends.md. Line 201 verbatim-quoted a test output line that no longer exists, and two prose lines claimed paseo metadata validation. Corrected all three; the quoted block now matches actual suite output exactly. VERIFIED LOCALLY, all pass: tests/fm-backend-paseo.test.sh (11 ok), tests/fm-teardown-endpoint-safety.test.sh (14 ok), full backend-dispatch family (17/17, 0 failed), tests/fm-bootstrap.test.sh, tests/fm-documentation-audiences.test.sh, bin/fm-lint.sh (ShellCheck 0.11.0 plus actionlint 1.7.12), and bin/fm-test-run.sh --check-coverage (187 scripts partitioned). Files changed: bin/fm-backend.sh, docs/architecture.md, docs/configuration.md, docs/verification/runtime-backends.md, tests/fm-backend-paseo.test.sh, tests/fm-teardown-endpoint-safety.test.sh. Left uncommitted; committing and pushing belong to other phases
…s fail-closed default
…fm-spawn usage header
Registering paseo added runtime auto-detection from PASEO_AGENT_ID and PASEO_TERMINAL_ID. That is behavior that assumes consent, which VISION.md rules out under "Authority is explicit and never inferred": autonomy exists only as an explicit grant, and new capability ships as an option to enable. PASEO_AGENT_ID is also a leaking marker. A Paseo agent session exports it into every process it starts, so a tmux pane spawned by a Paseo-hosted firstmate carries it even though Paseo is not the executing layer. An ambient value that survives that far down the process tree cannot establish which runtime is executing, so selecting paseo from it would capture workers on a Paseo-hosted machine the captain never pointed at Paseo. Remove both detection arms and the auto-detect notice, with no replacement mechanism: paseo joins zellij and orca as never auto-detected, selectable only by config/backend, FM_BACKEND, or --backend. Everything else is unchanged - the registry entry, the spawn refusal, the cleanup-record refusal, and the tool delta all stand. The dated marker-leak evidence is kept and reframed as the justification for explicit-only rather than for a detection ordering that no longer exists. The one recorded block that reproduced shipped detection was re-run against the current code and its real output recorded, rather than left describing behavior that no longer happens.
…ader and test lib
6db550c to
13b2684
Compare
|
Your last triage was against tip Attestation now matches. You asked for a re-push to rebind it. That is done.
The auto-detection is gone. Every
The reason is the leak your triage and mine both identified: a Paseo agent session exports So an unconfigured home sees no behavior change from this PR at all. The remaining change to shared behavior is I have also rewritten the PR description, which previously still described the auto-detecting revision. What I am asking for: a re-triage at this tip, and the workflow authorization for it. The checks have never run on |
|
Following up on my own note above, because I think I was asking the wrong thing. I asked for a re-triage. Looking at what actually merges here, that was not the gap. Outside PRs land within hours when they fix an issue you have already marked So I have filed the decision instead of leaving it implied:
If the answer on #4484 is that you do not want it, please say so there and I will close this PR. I would rather have a clear no than leave it open indefinitely. For the record on the current state of this PR, since two of my earlier notes are now stale: tip is |
Intent
Register
paseo(the Paseo terminal app) as a known runtime session backend name, and land that name's safety boundary in the same change, before any lifecycle adapter for it exists.This makes the name referenceable and coherently refusable while the adapter is still being built, instead of leaving a half-known backend that some code paths accept and others do not.
Paseo exports
PASEO_AGENT_IDinto every descendant process, so an agent launched from inside Paseo inherits that marker even when it is running under an entirely different backend.First-hand evidence of that leak through a
tmuxspawn is recorded indocs/verification/runtime-backends.md.Treating an inherited marker as a selection would make
paseoan ambient default, so this change makes it explicit-only, the same posturezellijandorcaalready have: nothing auto-detects it, and it is reachable only through a localconfig/backendfile,FM_BACKEND=paseo, or an explicit--backend paseo.This follows
VISION.md's "Authority is explicit and never inferred", which states that "autonomy exists only as an explicit grant, never as a default, and new capability ships as an option to enable, never as behavior that assumes consent".An earlier revision of this PR did auto-detect paseo from those ambient markers; that detection has been removed, so the change now alters no behaviour for an unconfigured user and adds no new default.
Registering a name ahead of its adapter opens a cleanup hazard that is worth closing in the same change.
fm_backend_killhas no arm for such a backend, and teardown treats a kill failure as non-fatal, so accepting abackend=paseotask record would let teardown return the worktree, delete the task's only durable identity, and report success over a still-running terminal.fm_backend_validate_task_endpointtherefore now fails closed by default for any known backend registered ahead of its lifecycle adapter, rather than carrying a paseo-specific record check that would have to be repeated for the next such backend.What Changed
paseotoFM_BACKEND_KNOWNbut deliberately not toFM_BACKEND_SPAWN: it is never auto-detected (like zellij and orca), so it is reachable only throughconfig/backend,FM_BACKEND=paseo, or an explicit--backend paseo, and every spawn kind then refuses at the sharedfm_backend_validate_spawnboundary before any task record exists.fm_backend_required_tools paseodeclarestreehousealone, since the Paseo CLI lives inside the app bundle behind$PASEO_CLIrather than onPATH.fm_backend_validate_task_endpointto fail closed by default for any known backend registered ahead of its lifecycle adapter, replacing the per-field paseo record check. Becausefm_backend_killhas no arm for such a backend and teardown swallows kill failures, accepting the record would let teardown return the worktree, delete durable metadata, and report completion over a still-running terminal.tests/fm-backend-paseo.test.sh(registry, detection, tool delta, spawn refusal, and endpoint-validation coverage, wired into thebackend-dispatchtest family), extend the bootstrap and teardown endpoint-safety suites, and sync the backend enumerations inAGENTS.md,CONTRIBUTING.md,docs/architecture.md,docs/configuration.md, and the bootstrap-diagnostics skill, with dated first-handPASEO_AGENT_IDleak evidence recorded indocs/verification/runtime-backends.md.Risk Assessment
✅ Low: The change is well-bounded and additive - a name registration plus two shared fail-closed boundaries - with regression tests that drive the real functions end to end, every documentation enumeration verified accurate against the shipped code, and the only finding being a session-start diagnostic gap rather than a correctness defect.
Testing
I exercised the paseo safety boundary through the real CLIs rather than only through unit assertions. The targeted suites all pass: the new paseo suite (11 ok), teardown endpoint safety including the paseo teardown case (20 ok), bootstrap including the treehouse-only tool delta and the known-list diagnostic (29 ok), the core backend suite (25 ok), and the documentation-audience suite (4 ok); the autodetect smoke suite skips because herdr is not installed here. On top of that I produced an end-user CLI transcript that shows the substance of the change working: with an inherited PASEO_AGENT_ID the pre-change library resolved
paseowhile the shipped library selects nothing, and a real fm-spawn run under those same ambient markers crosses the backend boundary without selecting paseo and stops later on an unrelated check; all three explicit selection forms and both spawn kinds refuse withbackend 'paseo' does not support task spawning yetand leave the state directory empty; and a well-formed backend=paseo cleanup record makes real fm-teardown refuse withREFUSED: backend 'paseo' has no lifecycle adapter ... preserving task state.while the meta file and worktree survive intact. I also re-ran the paseo and backend suites with PASEO_AGENT_ID and PASEO_TERMINAL_ID exported to confirm that removing the shared test-lib scrub in this run does not make either suite environment-dependent. No screenshot or rendered-HTML artifact applies: this change is entirely shell-level backend registration, refusal messages and docs, with no UI, HTML or rendered surface, so the terminal transcript is the actual end-user surface. Overall result: everything passed and no actionable issues were found.Evidence: End-to-end CLI transcript: paseo is explicit-only, refuses every spawn, and refuses cleanup instead of orphaning the terminal
Source: End-to-end CLI transcript: paseo is explicit-only, refuses every spawn, and refuses cleanup instead of orphaning the terminal
Evidence: Reproducible demo script that generated the transcript (drives real fm-spawn.sh / fm-teardown.sh)
Source: Reproducible demo script that generated the transcript (drives real fm-spawn.sh / fm-teardown.sh)
Evidence: Key transcript excerpt: auto-detection removed, explicit selection refuses, cleanup preserves task state
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-spawn.sh:66- The usage header states "A resolved backend that is known but not spawn-capable refuses at fm_backend_validate_spawn before any task record exists, so auto-detection can select a backend this script will then refuse." That second clause was true only while paseo was auto-detected. Commit 94ca966 deleted both paseo detection arms, so fm_backend_detect can now set FM_BACKEND_DETECTED to exactly tmux (bin/fm-backend.sh:171), herdr (:177), or cmux (:183, :189) - and all three are in FM_BACKEND_SPAWN (:84). The detectable set is now a strict subset of the spawn set, so the described case is unreachable: a non-spawn-capable backend can only be resolved from an explicit --backend, FM_BACKEND, or config/backend. CONTRIBUTING.md requires each bin/ script's usage header to stay accurate when behavior changes, and this is the one place left in the tree still asserting that auto-detection can hand this script a refusing backend (every other doc - AGENTS.md:75, CONTRIBUTING.md:44, docs/architecture.md:216, docs/configuration.md:129/136 - was corrected). Remedy is mechanical: drop the "so auto-detection can select a backend this script will then refuse" clause and keep the refusal sentence, which remains true for explicit selection.tests/lib.sh:52- Simplification/scope: the change introduces a global ambient-environment scrub in the shared test library (unset PASEO_AGENT_ID PASEO_TERMINAL_IDat tests/lib.sh:52, with a 12-line justification at :41-51) that no intent requirement needs any more. Its stated purpose is detection isolation - the comment says "fm_backend_detect selects the paseo backend from PASEO_AGENT_ID or PASEO_TERMINAL_ID" and "Left in place, that ambient marker would silently change what an unpinned spawn resolves to". Neither is true after commit 94ca966: fm_backend_detect no longer reads either variable (bin/fm-backend.sh:167-194), and a repo-wide grep shows nothing under bin/ reads any PASEO_* value at all, so an inherited marker cannot change what any test resolves. The scrub is therefore inert, and every assertion that depends on those variables already sets or unsets them per case inside tests/fm-backend-paseo.test.sh (:98, :103, :110, :125-141, :156, :171, :178) - which is what the comment itself says is the real mechanism. The intent requires paseo to be explicit-only and never auto-detected; it requires nothing of the shared test harness, and this is the only component the change added that no requirement reaches. Remedy is removal of the unset and its comment block from the shared library, not correcting the comment - keeping it would preserve a scrub whose only stated justification is behavior that was deliberately deleted. Flagged ask-user because it deletes something the author wrote on purpose, not because it is a defect today.🔧 Fix: drop stale paseo autodetect claims from spawn header and test lib
1 warning still open:
bin/fm-bootstrap.sh:1421- Registering paseo in FM_BACKEND_KNOWN turns session-start bootstrap from fail-closed to silent for a home that cannot spawn anything. Concrete sequence: a captain follows the contract this change documents (docs/configuration.md:136, AGENTS.md:75) and writespaseointo localconfig/backend. Bootstrap resolves it at bin/fm-bootstrap.sh:902, and BACKEND_VALID is set to 0 only whenfm_backend_required_toolsFAILS (:904-907). Since bin/fm-backend.sh:351 now answerstreehousefor paseo, BACKEND_VALID stays 1, theBACKEND_INVALIDline at :1421-1423 never prints, and with treehouse present the entire bootstrap run emits nothing at all - tests/fm-bootstrap.test.sh:750 pins exactly that total silence as the expected outcome. Before this change the same config value was an unknown backend,fm_backend_required_toolsreturned 1, and bootstrap printedBACKEND_INVALID: paseo (known: ...), which .agents/skills/bootstrap-diagnostics/SKILL.md:29 tells the agent means "do not dispatch work until the ... value is corrected". So the captain now gets a clean health report, the fleet dispatches, and every ship/scout/secondmate spawn fails at fm_backend_validate_spawn (bin/fm-backend.sh:317-323) instead of being caught at the session-start gate the repo uses for exactly this class of misconfiguration. The related agent-facing hazard -BACKEND_INVALID: bogus (known: tmux herdr zellij orca cmux paseo)now listing paseo as a valid correction target - IS mitigated by the two lines this change added to SKILL.md:30-31; the directly-resolved paseo case has no such mitigation because no diagnostic fires for it at all. The intent requires spawn refusal but says nothing about bootstrap, and the refusal is loud when it happens, so this is not merge-blocking. Flagged ask-user rather than auto-fix because the smallest honest remedy EXTENDS the change: it needs a new session-start diagnostic distinguishing "resolved backend is known but not in FM_BACKEND_SPAWN" from BACKEND_INVALID, plus a skill entry telling the agent how to act on it, and the silence is currently asserted as correct by a test the author wrote deliberately. It is the remedy, not the defect, that needs authorization.✅ **Test** - passed
✅ No issues found.
bash tests/fm-backend-paseo.test.sh(11/11 ok: registration, explicit-only selection, spawn refusal, endpoint refusal, adapterless fail-closed default)bash tests/fm-teardown-endpoint-safety.test.sh(20/20 ok, incl.fm-teardown: a paseo endpoint refuses and keeps every record)bash tests/fm-bootstrap.test.sh(29/29 ok, incl.bootstrap: a paseo home requires treehouse alone - never tmux, jq, or a PATH paseo CLIand theBACKEND_INVALID: bogus (known: ... cmux paseo)diagnostic)bash tests/fm-backend.test.sh(25/25 ok - detection, fm_backend_name precedence, spawn validation unaffected)bash tests/fm-documentation-audiences.test.sh(4/4 ok, covering the changed docs surfaces)bash tests/fm-backend-autodetect-smoke.test.sh(skips cleanly: herdr not installed on this host)PASEO_AGENT_ID=... PASEO_TERMINAL_ID=... bash tests/fm-backend-paseo.test.shand same fortests/fm-backend.test.sh- re-run with ambient Paseo markers exported to confirm this run's removal of thetests/lib.shscrub leaves both suites hermetic (11/11 and 25/25, zero not-ok)Manual E2E CLI transcriptpaseo-explicit-only-demo.sh: before/afterfm_backend_detectunder an inheritedPASEO_AGENT_ID(pre-change commit 9aa6940 vs this change); realbin/fm-spawn.shwith ambient PASEO markers and no explicit backend; realbin/fm-spawn.shsecondmate and ship spawns selected via--backend paseo,FM_BACKEND=paseoand aconfig/backendfile; realbin/fm-teardown.sh <id> --forceagainst a well-formedbackend=paseorecord with before/after listing of the state dir and worktree✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.