Repository navigation
fix(container): geectl logins as files, a Gitea login, pinned download, no git-obs - #176
Conversation
scarabeusiv
left a comment
There was a problem hiding this comment.
Aggregate review of 349ed2b (Standards + Spec + native OCR, all at head; CI red: check-skills.py 1 finding, shell suites green).
Standards: clean apart from the findings below. No personal info, no process narration, current status only.
Spec: the headline claims verify — both pinned SHA-256s match the live v0.3.0 SHA256SUMS exactly; the unit mounts both secrets mode=0400 at exactly the paths the _FILE vars name, with no password/token env left in the unit; the launcher unsets all six vars at startup; tea's -X/--data/--remote invocation is valid (tea api.go: method has alias X, --data must be valid JSON, --remote selects the login); pull-request search pages to 100 full pages and fails SearchTooBroad beyond, so the dropped 50-limit guard is safe for volume; pull-request submit requires a geectl working copy, so the tea gap for the pool-PR create is real; --debug-body deny is present in all 8 snippets and the Factory denial is removed from all 8.
Blocking (verified at head):
- CI red, introduced by this PR: check-skills.py reports 1 finding,
contrib/harness/README.md:334: OBS home project (names its owner): home:x. The Gemini example change puthttps://api.opensuse.org/source/home:xin the README; main is green. Use a URL with no home: project. --debug-bodydeny is bypassed in agy + codex by any leading global option (medium, README.md:60, agy/settings.json:29, codex/opensuse-packaging.rules:49):command(geectl --debug-body)andprefix_rule(["geectl", "--debug-body"])are prefix-anchored, sogeectl --format json --debug-body request show 1— the skill's own default spelling — does not match. README:60 ("denied anywhere in a command") is contradicted by the README's own limitations at :103-111 and :346-350. The other six snippets catch it. Either narrow the claim to what the prefix snippets can express, or add the common spellings as rules, with a global-options probe pinning it.watch-submissions.sh: a wrong--loginfakes RESOLVE PRs and wipes the baseline (medium, watch-submissions.sh:122-131, :337-362): the--loginvalue goes straight into--creatorwith no validation, and geectl's search succeeds with an empty set for an unknown creator instead of failing. The empty set diffs as RESOLVE PR for every baseline PR, and the baseline is then overwritten with the empty set (gitea_okis true). Old behaviour:tea api --login <bad>failed, the leg went unavailable, the baseline was kept. The trigger is narrow (explicit--logintypo; the default whoami path is safe) but the evidence is destroyed. Fix: validate an explicit--loginagainstgeectl gitea whoamiand fail the leg on mismatch.- Reference docs still describe the old behaviour (medium, both confirmed at head):
references/script-usage.md:53says pool-pr.sh "needs agit-obslogin for src.opensuse.org (the PR create/update)" — create is now tea, update isgeectl pull-request edit;references/git-workflow.md:48says "the PR filing still goes throughgit-obs -G src.opensuse.org apiuntil geectl gains a create leaf, so a git-obs login is still needed" — filing now goes through tea and no git-obs login is needed at all. Both lines need updating with the scripts.
Non-blocking (fix in the same push or follow-up):
pool-pr.sh:92claims "tea exits 0 on an HTTP error: the caller reads the answer", unproven: tea's api.go returns nil after copying the body without checking the status, and only transport errors return non-zero; the test fake itself exits 1 for the API-fail case, so the suite exercises the exit-1 path. Either branch exits 6, so impact is limited — soften the comment or verify against real tea.- The watcher reads only
["pull_requests"]and ignoresskipped_items(geectl 0.3.0 read-back 404s): a skipped PR is treated as "no longer open" and gets a RESOLVE PR line. Carry skipped items into the baseline, or treat any skipped item as leg-unavailable. - The 0400 mode is pinned only as unit text (
tests/test-skill-container.sh:1103exact-line-matches the unit file);image-checkasserts only the mount-point directory. No test asserts the mounted files' actual mode in a running container. - "The image no longer holds osc or git-obs" overstates: neither ever appears in the Dockerfile's history (
git log -Sis empty for both). The functional removal is real (no script references git-obs); fix the narrative. - Other reference docs still direct the agent to git-obs, outside this diff:
references/incoming-review.md:142,150,references/request-text.md:55,references/update-build.md:262,references/script-usage.md:44. Follow-up grade. - The C1 sed one-liner (
skill-container:445,${x;...}grouping) is GNU-sed-only — BSD sed rejects it. Harmless in practice (launcher is Linux-only, CI passes), but the old read-loop was portable; note the GNU dependency.
Native OCR: 30 files, 3 mediums + 3 lows + 3 nits above; the C1 sed rewrite is equivalent to the old loop on adversarial cases; colon SGR strip and SIGINT handling verified.
Verdict: CHANGES_REQUESTED. No merge.
|
Fixed in 18c42e4..6e48709: the README example names no home project, |
The unit handed the password to the container as GEECTL_OBS_PASSWORD, so every process the agent starts inherited it and a plain `env` printed it. geectl reads GEECTL_OBS_PASSWORD_FILE as well: the same secret is now mounted read-only under ~/.config/geectl, where every harness snippet and pr-guard already refuse a read, and only the path is in the environment. The container's own rules deny that directory too, and the image creates the mount point its read-only root needs.
geectl had no Gitea token in the container, so every gitea and pull-request leaf the scripts call failed there. geectl reads only GEECTL_GITEA_TOKEN or GEECTL_GITEA_TOKEN_FILE, not the token in tea's config, so `secrets` now takes the token from the same environment the host's geectl uses and stores it as opensuse-packaging-geectl-gitea-token. The unit mounts it beside the OBS password and names it with GEECTL_GITEA_TOKEN_FILE; install and up refuse to start without it. The README says how to upgrade from the osc image, that the build cannot try a login, and that the old opensuse-packaging-osc secret is left for the user to remove.
git-obs left the container image with osc, yet pool-pr.sh still opened and edited pool PRs through it and watch-submissions.sh read the PR leg through tea, so both broke there. geectl has typed leaves for all but one call: the PR edit is now `pull-request edit`, the watcher's open-PR set `pull-request search --creator` (all pages, so the 50-entry cut and its skipped diff are gone), its account `gitea whoami`. geectl opens a PR only from a working copy of its own, which a pool clone is not, so the create stays a tea api call run in the clone to take the login of its origin. tea therefore stays in the image; git-lfs, which pool-pr.sh needs and which no longer came in with osc, is installed explicitly, and image-check runs both. Closes #161
The build checked the geectl tarball against a SHA256SUMS fetched from the same release, so whoever could replace the asset could replace the sums with it. The two per-arch hashes of the pinned version are now ARGs of the Dockerfile, a version bump changes all three, an unknown arch or a mismatch stops the build, and the download is held to https. Closes #160
The static deny of `geectl request file|refile ... --target-project openSUSE:Factory` refused every Factory submission, the eligible devel forwards that pr-guard and autoforward-gate allow included. The osc rule it replaced denied only the devel bypass (--nodevelproject). geectl has no such option: it files to Factory only from the recorded devel project and refuses anything else itself, so the rule goes from every snippet and Factory targets are left to pr-guard. The probes now pass a devel forward to Factory through every harness, and the Gemini quoting limit is shown with a rule that still exists.
Without --locked, cargo install resolves geectl's dependencies afresh on every run, so the check-geectl job could break, or change behaviour, on a new release of any crate in the tree while geectl itself stays pinned.
--debug-body prints request and response bodies, and geectl redacts only the fields whose names it knows to hold a secret. Every snippet already refused remote create-token, the GEECTL_OBS_/GEECTL_GITEA_ values on a command line, the ~/.config/geectl paths and sudo outside `geectl local-build chroot`/`wipe`; this was the one geectl form still open. The probes refuse it in all harnesses and let a plain --debug run. Closes #159
CONTAINER.md told the agent that builds run in containers while the README said `geectl local-build build` does not work. Both now say what geectl does: every local-build command starts its work in a podman container through the podman command, and the image has no podman, so none of them runs there and builds go to OBS. The release-tag section names the geectl forms of the service trigger: a runservice token from `remote create-token` for a webhook, or `service trigger` by hand. The sub-agent names, the tool list, the host requirements and the OBS login text were already current. Closes #166
The colour filter matched only ;-separated SGR parameters, so a 38:2::r:g:b colour lost its ESC but left its parameters on the terminal. The C1 filter printed a Python traceback when Ctrl-C reached it; it now dies of SIGINT as of SIGPIPE. api() read the error stream a byte at a time with `read` to find the last HTTP status line; one sed reads it in blocks.
geectl takes obs_url and gitea_url from its config file under $XDG_CONFIG_HOME, so a config file the agent could point it at would send the mounted password or token to another host. GEECTL_OBS_URL and GEECTL_GITEA_URL win over the config file, so the unit now sets both.
The status lookup in api() ran sed in whatever locale it inherited; in a UTF-8 locale an invalid byte after "HTTP 404" could leave a code that is no number, and a final refusal would be retried. The launcher exports LC_ALL=C at its start already; the call now says so itself, as plain() does.
check-skills.py refuses an OBS home project in the docs, since it names its owner, and the example URL used home:x.
The Codex and Antigravity rules match a command prefix, so they caught `geectl --debug-body` but not `geectl --format json --debug-body`, the spelling the skill uses. They now also match it after --format json, --format text, --format=json/text and --live, and the README says that only the globs, the Gemini CLI rules and the Kimi hook catch it anywhere.
geectl's search answers an empty set for a creator with no PRs, so a mistyped --login read as "every PR resolved" and overwrote the baseline with nothing. The watcher now searches only as the owner of geectl's Gitea token: an explicit --login must name that account, and a mismatch or a failed whoami makes the Gitea leg unavailable with its baseline kept. A search answer that names a skipped arm or skipped items may lack PRs too, and is treated the same way.
pool-pr.sh opens a pool PR through tea api and edits one through geectl, so the script-usage and git-workflow lines that asked for a git-obs login described what it no longer runs.
Whether tea api reports an HTTP error by its exit status, in its answer, or both is not established, and the comment claimed it exits 0. pool-pr.sh stops on either, and a failure with nothing on tea's error stream now names the server's answer instead of "no usable answer".
The script uses ${x;...} after an address and -E, which BSD sed reads
differently.
6e48709 to
2a0495c
Compare
scarabeusiv
left a comment
There was a problem hiding this comment.
Re-review at 2a0495c: three of the four round-1 blockers are fixed and verified at this head. One remains.
Fixed and verified:
- check-skills.py home-project finding: contrib/harness/README.md:334 no longer names a home project in a URL; the example is now a curl call against api.opensuse.org. No
home:<owner>occurrence remains in the file. - watch-submissions.sh --login: the Gitea leg resolves the token owner with
gitea whoamiand searches only when --login is absent or matches it case-insensitively, searching as the owner (skills/opensuse-packaging/scripts/watch-submissions.sh:120-130). Any other name leaves the leg unavailable and the baseline kept. A search answer carryingskippedorskipped_itemsis likewise treated as unproven (:222-232). Tests cover the owner-in-any-case, other-account, skipped-answer and whoami-fails paths. - Stale git-obs docs: references/script-usage.md:53 and references/git-workflow.md:48 now say pool-pr.sh needs a tea login (PR create, a
tea apicall) and geectl's pull-request edit leaf (update); no git-obs login. - Re-checked at this head: the Dockerfile's inline SHA-256 pins match the live v0.3.0 SHA256SUMS for both arches, and the
tea api --remote origin -X POST --datainvocation matches tea's api flags (method/data plus LoginRepoFlags).
Remaining blocker:
- contrib/harness/agy/settings.json denies
geectl --debug-bodyafter--format json|textand--live, but not after the equals spelling--format=json|text, which clap accepts and the Codex rules already cover (contrib/harness/codex/opensuse-packaging.rules).geectl --format=json --debug-body ...runs unchallenged under Antigravity. Addcommand(geectl --format=json --debug-body)andcommand(geectl --format=text --debug-body), with the two probes in tests/fixtures/harness/agy-commands.json.
Not blocking: --debug, --instance and two-global-option prefixes remain uncovered in both snippets; the README states that boundary, and the prefix form cannot express an --instance value.
CI at review time: lint and quilt green; tests (python 3.11/3.13/3.15) still running.
The points are fixed in the last eight commits; CI is green on that head.
The OBS password reached every child process as an environment variable; it and a new Gitea token are now mounted as 0400 files.
pool-pr.shandwatch-submissions.shno longer need git-obs, which left the image with osc; the geectl tarball is pinned by hash. tea stays for the one pool-PR create geectl has no leaf for.