Skip to content

chore(bin): add bin/setup and bin/check — the fleet cannot install deps here, so no coding task can pass its gate #81

Description

@ivndev001

What to build

Add bin/setup and bin/check so a developerz.ai fleet box can install this repo's dependencies
and prove a change against them. Without bin/setup no coding task on this repo can ever pass its
gate
, and that is measured, not predicted.

The evidence

Every team_verify verdict ever recorded for this repo: 0 green, 18 red, 7 no_verdict. The
coding gate has never once passed here.

A run today (tsk_fe8d947f…, for issue #80) shows the exact mechanism. The agent did the work
correctly and self-verified it:

Scoped check passes: grep -n esbuild CONTRIBUTING.md exits 1 with no output — no esbuild
references remain in the file. The comment now reads # tsc -p tsconfig.build.json emit, matching
package.json:27's build script.

Then the gate died:

$ tsc --noEmit -p tsconfig.json
/usr/bin/bash: line 1: tsc: command not found      exit 127

graded gate_unrunnable — "this box is missing the toolchain this repo proves itself with. A
provisioning fault, and no evidence about the change. Nothing was committed."
The correct edit was
discarded.

The stage before it says why, in the platform's own words:

{"ran": false, "event": "team_setup", "reason": "no_setup_script",
 "detail": "this checkout has no bin/setup, so nothing was run and nothing was guessed
  in its place; onboarding writes one (setup mode proves it), or the repo can add its own"}

team_toolchain had already reported ok: true, manager: mise — so bun was installed and this
repo's node_modules were not. The runner deliberately refuses to guess an install command; the
documented remedy is the one this issue takes: the repo adds its own.

What the scripts must be

The platform's Bun stack profile (apps/runner/src/modes/setup/base/stack.ts) declares the trio:

setup: 'bun install'
check: 'bun run typecheck && bun run lint && bun test'

Both scripts: #!/usr/bin/env bash, set -euo pipefail, cd "$(dirname "$0")/.." so they work from
any cwd, executable (chmod +x, mode 100755 in git).

bin/setup — bun install, plus the dummy/web fixture build. CONTRIBUTING.md line 33 and
.github/workflows/ci.yml both record that the fixture's dist/ must exist before bun test or the
e2e suite cannot find it; a setup that skips it leaves bin/check failing for a reason that is not
the diff. Guard the mise activation the way wurk's bin/setup does — if command -v mise >/dev/null
then mise install and eval "$(mise env -s bash)" — so a laptop without mise skips it rather than
hard-failing.

bin/check — the three gates in the profile's order. Prefer failing on the FIRST red leg
(set -e plus &&) so the tail the platform captures names the leg that failed.

Acceptance criteria

  • bin/setup and bin/check exist, are executable (git mode 100755), and run from any cwd
  • bin/setup on a clean checkout leaves bunx tsc --version resolvable and the dummy/web
    fixture built
  • bin/check exits 0 on an unmodified clean checkout after bin/setup
  • bin/check exits NON-ZERO when a typecheck error is introduced (prove the gate can fail —
    a gate that cannot fail is not a gate)
  • Neither script changes package.json, .github/workflows/ci.yml, or any source file
  • CONTRIBUTING.md mentions bin/setup / bin/check as the one-command entry points

AFK / HITL

AFK.

Affected paths

bin/setup, bin/check, CONTRIBUTING.md

Verified against

a277712

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions