Skip to content

fix(herdr): support named primary sessions in lab tripwire - #2820

Closed
Ikha14 wants to merge 2 commits into
kunchenguid:mainfrom
Ikha14:fm/test-herdr-lab-recovery-v1
Closed

fix(herdr): support named primary sessions in lab tripwire#2820
Ikha14 wants to merge 2 commits into
kunchenguid:mainfrom
Ikha14:fm/test-herdr-lab-recovery-v1

Conversation

@Ikha14

@Ikha14 Ikha14 commented Aug 23, 2026

Copy link
Copy Markdown

Summary

  • let the isolated Herdr lab tripwire protect one exact recorded running primary session, including a named primary such as fm-wsl-minimal
  • retain strict lab namespace, running-state, uniqueness, byte-identical snapshot, and immediate destructive ownership checks
  • fix the focus-flash Part C fixture so sleep is a direct shell child rather than a grandchild hidden behind an asynchronously executed && list

Causal units

  1. fix(herdr): protect recorded named primary in lab tests
  2. test(herdr): keep persistent-child fixture direct

Validation

  • timeout 600s tests/fm-herdr-lab.test.sh
  • timeout 600s tests/fm-backend-herdr-focus-flash-e2e.test.sh
  • bounded affected Herdr lab family: AFK injection/launch, autodetect, launcher workspace, presentation, prune safety, respawn idempotence, workspace-per-home, control, and session cleanup all passed
  • timeout 600s bin/fm-doc-audience-check.sh
  • timeout 600s bin/fm-lint.sh

No live primary Herdr lifecycle operation was performed.

@greptile-apps

greptile-apps Bot commented Aug 23, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code defect identified.

The named-primary resolution matches the documented safety contract, retains exact running-state and uniqueness checks, and the fixture change correctly creates the direct child required by the test.

Reviews (1): Last reviewed commit: "test(herdr): keep persistent-child fixtu..." | Re-trigger Greptile

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

VISION (read current main 1231b6a in full). Inspected bin/fm-herdr-lab.sh, docs/herdr-backend.md, tests/fm-herdr-lab.test.sh, tests/herdr-test-safety.sh, tests/fm-backend-herdr-focus-flash-e2e.test.sh. Per-rule: strengthens a refusal path aligns (tripwire can protect an exact recorded running named primary such as fm-wsl-minimal, still refuses lab-namespace / missing / stopped / duplicate); lab isolation aligns; new capability as opt-in aligns for FM_HERDR_LAB_PRIMARY_SESSION. Mixed on the default path: when that var is unset, HERDR_SESSION is inherited (also re-exported from tests/herdr-test-safety.sh), and the jq match dropped the .default == true requirement in favor of exact name + running. Unset still falls back to literal default.

Class: corrective. Named-primary tripwire hole plus a test fixture so sleep is a direct shell child (cd / && sleep 3000 &cd /; sleep 3000 &). Not default-behavior for production dispatch; this is the lab helper.

Security: none. No workflow files. Tripwire is safety-positive. Does not edit bin/backends/herdr.sh.

Overlap / HOLD: none that match the standing list. Not spawn/teardown, so hold-pair #2637/#2692 does not apply as an eligibility block the way lifecycle PRs do. #2792 overlap is herdr.sh-only and does not apply.

CI / NM: HEAD af6be6ebbf073d67ade2f3e42b46aa717f9c6048. MERGEABLE / UNSTABLE, ahead 2 / behind 0. Body has no no-mistakes-pipeline-attestation:v1. After this-pass approval, Require no-mistakes run 32607449835 completed FAILURE (body compliance) = NM red. CI run 32607449807 was queued at stamp. Greptile SUCCESS — not a gate.

Workflows approved this pass: 32607449807 (CI), 32607449835 (Require no-mistakes).

Land-eligible: NO (NM red without matching attestation; CI not green). Author needs a matching no-mistakes-pipeline-attestation:v1 for this HEAD. Captain-flag NOW: no.

@Ikha14

Ikha14 commented Aug 23, 2026

Copy link
Copy Markdown
Author

Superseded by #2835, which preserves these fixes and pins the primary-session identity independently of mutable lab HERDR_SESSION.

@Ikha14

Ikha14 commented Aug 23, 2026

Copy link
Copy Markdown
Author

Closing in favor of #2835.

@Ikha14 Ikha14 closed this Aug 23, 2026
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