Repository navigation
Commit 39bcfce
feat: jq in the image, and a stated boundary for the shell test toolbox (#13)
* feat: jq in the image, and a stated boundary for the shell test toolbox
Two repos in the fleet conversion failed `sdlc ci` on pytest for the same
reason, and it was not their code: `jq: command not found`.
- crunchtools/josui: all four entrypoint tests. The entrypoint is a shell
script and calls jq at line 87.
- crunchtools/claude-agent: 4 of 103 shell-hook tests. mypy, pip-audit, the
constitution validator and CodeQL all pass there; the only external command
the hook calls is jq.
This is not one repo's quirk. Claude Code hands a hook its event as JSON on
stdin, hooks are shell scripts, and jq is the smallest correct way to read JSON
from bash. Both repos declare `Requires: jq` in their own package manifests
(packaging/claude-agent.spec:16 and the debian control file; josui's
Containerfile installs it). More hook-shipping repos are coming.
The alternative was to run those tests inside each repo's own built image with
the `pytest-in-image` kind. That is the right answer for a per-repo runtime
dependency, and it is the answer for crunchtools/tig, whose tests need the
image's install paths (crunchtools/tig#29). It is the wrong answer here:
claude-agent's reference Containerfile installs the PUBLISHED package, so
building it in the gate would test the last release rather than the pull
request. Its real install test is already the 8-distro matrix in packages.yml.
Those four are unit tests of a shipped script whose declared dependency is jq,
and unit tests belong in the gate image.
So jq goes in, and the boundary goes in as a comment above the `dnf install`,
where someone adding the next package will read it: beyond the checks this
image carries bash, coreutils, git, curl, python3 and jq, and nothing else. A
test that reaches for socat, nc, node or a repo's own runtime is an integration
test and belongs in `pytest-in-image` against that repo's image, or in a new
kind. Without a written line this list becomes a host-tools grab bag one repo
at a time.
tests/contract.sh now asserts jq, curl and bash execute, alongside the checks it
already proves. That makes the toolbox a tested property of the image rather
than an accident of the base, which matters because the base is Hummingbird and
deliberately thin -- `which` is already in this list for exactly that reason.
RT#1552
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R7Y1jesjfgxHeqtKJCvay6
* fix: the release race that cost v0.3.5 its image
`container.yml`'s concurrency group was keyed on `github.run_id`. That value is
unique per run, so every run sat in a group of its own and the group controlled
nothing at all.
A merge to main and the tag `release.yml` creates from it are two pushes of the
SAME commit. Both built it, both pushed the same `:<sha>` tag, the second
replaced the first's manifest, and then the loser's "Verify the pushed digest"
step failed with `manifest unknown` on a digest that no longer existed.
v0.3.4 happened to win that race. v0.3.5 lost it: the main run moved `latest`,
the tag run failed, and the `0.3.5` tag was never created. There is a git tag
and a GitHub release for v0.3.5 with no image behind them, which is the one
state a fleet pinning this image by exact release cannot survive -- `sdlc`
exits 2 with "manifest unknown" and nothing is checked. The only reason no repo
is broken by it is that the promote job which opens the version-bump pull
requests lives in the run that failed, so the bump never went out.
Keyed on `github.sha`, the two runs serialize and the second verifies the digest
it just pushed. `cancel-in-progress` stays false off pull requests: cancelling
the main run when its tag arrives would abandon a push half-finished.
v0.3.5 is superseded by this release rather than backfilled.
RT#1552
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R7Y1jesjfgxHeqtKJCvay6
* fix: the Containerfile version label, which the validator caught
Constitution II: every file that states the version states the same one. I
moved IMAGE_TAG and pyproject.toml to 0.3.6 and left `LABEL version="0.3.5"`
behind, and `Constitution / Validate constitution` said so:
VERSION: Containerfile says 0.3.5, CHANGELOG.md says 0.3.6 (II)
Which is the check working. mcp-github's 2.0.0 was bumped by hand in two of its
five places and could not be tagged; that is why the rule exists.
RT#1552
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R7Y1jesjfgxHeqtKJCvay6
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent 2d5c687 commit 39bcfce
7 files changed
Lines changed: 109 additions & 6 deletions
File tree
- .github/workflows
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
28 | 43 | | |
29 | | - | |
| 44 | + | |
30 | 45 | | |
31 | 46 | | |
32 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
9 | 56 | | |
10 | 57 | | |
11 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
91 | 107 | | |
92 | 108 | | |
93 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
0 commit comments