Skip to content

fix(ci): nightly installer job plants a harness before install.sh (red 5 nights) - #27

Merged
NetDevAutomate merged 3 commits into
mainfrom
fix/nightly-installer-harness-fixture
Sep 20, 2026
Merged

NetDevAutomate merged 3 commits into
mainfrom
fix/nightly-installer-harness-fixture

Conversation

@NetDevAutomate

Copy link
Copy Markdown
Owner

Summary

The Nightly Install Check's installer job (A4, added in b5339db9 on 2026-09-14) has failed every night since it was added (runs 34949338879 … 35431368317; the last green nightly, 34826479107, predates the job). Cause: the job isolates HOME to an empty scratch directory so studyloop install agents writes there — but an empty HOME has no harness, the runner has no codex/opencode/pi/grok on PATH, so detect_available_agent_tools() returns [] and install.sh exits 1 at "Installing agent definitions" with "No supported AI tools detected" — the script's documented behaviour. The two tools the job exists to prove had already installed fine; its verify step never ran.

Verification

  • Faithful local reproduction of the runner: empty HOME + a PATH holding only uv and the system bins → exit 1 with the runner's exact message. Planting the markers → exit 0.
  • The full ./scripts/install.sh --non-interactive --no-smoke run the way the fixed job runs it (HOME, UV_TOOL_DIR, UV_TOOL_BIN_DIR all in scratch, uv-only PATH): exit 0, "Installation complete!", both entry points answer, all seven artefacts present.
  • test_ci_workflow_contract.py 14/14; all pre-commit hooks (incl. pyright) on both commits.
  • Not verifiable here: the nightly run itself — workflow_dispatch on main after merge, or 03:30 UTC.

Not touched: install.sh's refusal when no harness exists (correct; the README states a harness is a precondition).

… install.sh

The `installer` job in nightly-install.yml (A4, b5339db, 2026-09-14) has
failed every night since it was added (runs 34949338879 .. 35431368317).
It isolates HOME to `${{ runner.temp }}/home` so `studyloop install agents`
writes into scratch, but an empty HOME has no harness: on the runner no
codex/opencode/pi/grok binary is on PATH and no ~/.kiro, ~/.claude, ~/.pi
or ~/.grok exists, so `detect_available_agent_tools()` returns [] and
`install.sh` exits 1 at "Installing agent definitions" — the script's
documented behaviour when no supported AI tool is present. The two tools
the job was written to prove had already installed fine by then; the
verify step never ran.

Reproduced locally with an empty HOME and a PATH holding only uv and the
system bins: exit 1, same message. Planting ~/.kiro (or ~/.claude, ~/.pi,
~/.grok — the markers the detector reads without a binary) makes the same
command exit 0 and write the links.

This test pins the fixture: the run step plants a marker before the
script, and a verify step reads what `install agents` wrote into the
isolated HOME. Red on the current workflow for that reason (1 failed,
13 passed).
…d HOME

GREEN for ee43863. The `installer` job isolates HOME so `install agents`
writes into scratch; the fixture now creates ~/.kiro, ~/.claude, ~/.pi and
~/.grok in that HOME first — the four markers detect_available_agent_tools()
reads without a binary — so `install.sh` reaches and exercises all four
link sets instead of refusing with "No supported AI tools detected".

A new step verifies what `install agents` wrote: two artefacts each for
kiro, claude and grok, one for pi, every path taken from installers.py
(_TOOL_LINKS / _configure_*). Without a read of the isolated HOME the
isolation proved nothing.

Proved locally the way the runner runs it: full ./scripts/install.sh
--non-interactive --no-smoke with HOME, UV_TOOL_DIR and UV_TOOL_BIN_DIR in
scratch and a PATH holding only uv and the system bins — exit 0,
"Installation complete!", both entry points answer, all seven artefacts
present. Contract module 14/14.

The nightly run itself can only be observed at 03:30 UTC or via
workflow_dispatch on main after merge.
…tus posted, left open

Both issues carry the proposals' content with every cited test id, symbol
and path verified against main a03fc9b before posting. #21 stays open
because its definition of done names OpenCode in the core tuple and the
harness receipt records OpenCode as preview on two named blockers.
Copilot AI lite review requested due to automatic review settings September 19, 2026 09:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Strengthen the workflow contract tests to enforce complete harness coverage and verification-step ordering.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Fixes the nightly installer job by seeding harness markers in its isolated HOME and verifying installation outputs.

Changes:

  • Plants Kiro, Claude, Pi, and Grok harness markers.
  • Verifies seven installed artifacts.
  • Adds workflow contract coverage and updates task status.
File Summary
packages/​studyloop/​tests/​test_ci_workflow_contract.py Tests the workflow contract. Moderate (3 votes): assert all expected markers. Moderate (1 vote): ensure verification follows installation.
openspec/​changes/​plan-integration-followons/​tasks.md Records completed follow-up work.
.github/​workflows/​nightly-install.yml Seeds harness directories and verifies installation outputs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +273 to +281
planted = [
marker
for marker in ("$HOME/.kiro", "$HOME/.claude", "$HOME/.pi", "$HOME/.grok")
if marker in run
]
assert planted, (
"the installer job runs install.sh in an empty HOME; plant at least one "
"directory-detected harness marker first or `install agents` exits 1"
)
@NetDevAutomate NetDevAutomate added this to the 0.5.0 milestone Sep 20, 2026
@NetDevAutomate
NetDevAutomate merged commit 4f8e3e0 into main Sep 20, 2026
23 checks passed
@NetDevAutomate
NetDevAutomate deleted the fix/nightly-installer-harness-fixture branch September 21, 2026 09:16
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