Skip to content

fix(test): remove avoidable host prerequisites - #2806

Closed
Ikha14 wants to merge 2 commits into
kunchenguid:mainfrom
Ikha14:fm/test-prerequisite-contracts-v1
Closed

fix(test): remove avoidable host prerequisites#2806
Ikha14 wants to merge 2 commits into
kunchenguid:mainfrom
Ikha14:fm/test-prerequisite-contracts-v1

Conversation

@Ikha14

@Ikha14 Ikha14 commented Aug 22, 2026

Copy link
Copy Markdown

Summary

  • replace the fake Cursor C build with a private copy of Bash that preserves the real executable-name classifier contract
  • let the workflow timeout contract use PyYAML when Ruby is absent, while retaining structural YAML parsing
  • document that Calm rendered-DOM assertions require a browser native to the test host, including the WSL boundary

Diagnosis

  • ShellCheck 0.11.0 and actionlint 1.7.12 were genuine pinned lint prerequisites; both now resolve from the approved user-local install and their tests pass unchanged.
  • The C compiler was an accidental fixture prerequisite: a copied Bash binary provides the required kernel-visible cursor-agent executable identity and -c behavior.
  • Ruby was an unnecessarily exclusive parser choice: installed PyYAML provides the same structural YAML assertion without weakening it.
  • Chrome/Chromium remains a genuine machine prerequisite for executing the exported HTML and asserting the rendered DOM. Windows Chrome via WSL interoperability was tested and is not equivalent because file-URL/profile path semantics differ. No assertion is skipped or weakened.

Validation

  • timeout 600s tests/fm-cursor-primary.test.sh
  • timeout 600s tests/fm-test-run.test.sh
  • timeout 600s tests/fm-lint-workflows.test.sh
  • timeout 600s tests/fm-lint.test.sh
  • timeout 600s bin/fm-lint.sh tests/fm-cursor-primary.test.sh tests/fm-test-run.test.sh
  • timeout 600s bin/fm-lint-workflows.sh
  • timeout 600s bin/fm-doc-audience-check.sh
  • bash -n tests/fm-cursor-primary.test.sh tests/fm-test-run.test.sh

tests/fm-calm-pi-extension.test.sh reaches the required rendered-DOM assertion and reports the documented missing native Chrome/Chromium prerequisite on this WSL host. Earlier non-browser assertions pass; the test remains intentionally failing locally rather than silently passing.

@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (2): Last reviewed commit: "fix(test): retain fake Cursor parent ide..." | Re-trigger Greptile

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

VISION: aligns. Setup stays simple and field incidents stay coverage: drop the accidental C-compiler fixture and the Ruby-only YAML parser without weakening the contracts. Kernel-visible cursor-agent identity is preserved by a private Bash copy (not a symlink). Workflow timeout assertions still require structural YAML (Ruby or PyYAML); missing both still fails. Native Chrome/Chromium for Calm rendered-DOM remains required and is documented, including the WSL boundary. No assertion is skipped.

Class: corrective. Test-host prerequisites only.

Security: none. Test fixtures and CONTRIBUTING prose. No product path, no workflow file, no credentials.

Overlap: none with the hold pair, spawn-freshen, Herdr, or watch PRs. Files: tests/fm-cursor-primary.test.sh, tests/fm-test-run.test.sh, CONTRIBUTING.md.

CI: HEAD 9e688e7450f7955852229bfb28f2c56d585fc80c. mergeable MERGEABLE, mergeStateStatus UNSTABLE. ahead 1 / behind 0. Fork CI 32601008330 in_progress (approved earlier this pass, not green). Require no-mistakes / body-compliance 32601008350 FAILURE. No structured no-mistakes-pipeline-attestation:v1 whose head_sha matches THIS HEAD — no-mistakes is blocking. Greptile SUCCESS — not a gate.

Workflows approved: yes (CI 32601008330, NM 32601008350). Land-eligible: NO. Waiting on CI; matching NM attestation still required from the author. Not waiting on the captain. Captain-flag NOW: no.

@Ikha14

Ikha14 commented Aug 22, 2026

Copy link
Copy Markdown
Author

CI failure diagnosis and scoped fix:

  • Failed check: Behavior portable serial 1, run https://github.com/kunchenguid/firstmate/actions/runs/32601008330.
  • Exact failing script/event: tests/fm-cursor-primary.test.sh exited 1 after not ok - the park did not run the arm; all six preceding host-guard assertions and the idle park assertion passed.
  • Cause: this PR replaced the compiled parent with a copied Bash executable, but Bash tail-executes a final external command. That changed /proc/<lock-pid>/exe from the fixture's cursor-agent to the adapter/interpreter before ancestry validation, so the lock no longer had a Cursor parent. This was caused by the PR.
  • Counterfactual on Linux: a copied Bash running sleep 2 reported tail-command-exe=/usr/bin/sleep; the same copied Bash with sleep 2; rc=$?; exit "$rc" reported status-preserving-exe=<tmp>/cursor-agent.
  • Fix in 22230f7: every copied-Bash command now captures and returns the child status after the adapter, preventing tail exec while preserving exact exit behavior. The explicit exec in the auto-arm fixture was removed for the same reason.
  • Validation: tests/fm-cursor-primary.test.sh passed four consecutive local runs; pinned ShellCheck 0.11.0 passed the changed test; bash -n and git diff --check passed.

The separate no-mistakes policy check is unchanged and intentionally not acted on under this task's direct-PR instruction.

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