Closes#270. Part of spec #268 and milestone 18. The decisions are recorded in ADR-0034.
What changed
check-apm-current.sh chooses its apm once. If the project pins apm-cli in pyproject.toml, has a uv.lock, and uv is on PATH, the hook runs uv run --project <root> --frozen --no-sync --offline apm. Otherwise it runs the apm on PATH. If neither exists, it exits 0 and prints nothing. The same binary is used for the outdated check and the update.
It never syncs. uv is only ever called with run --no-sync --offline. If the project environment (.venv or UV_PROJECT_ENVIRONMENT) is missing, the hook does not call uv, because a no-sync run would create an empty .venv. It prints a fixed not-synced notice instead.
It checks the apm version before the outdated check.
If the chosen apm is older than 0.39.2, it prints a fixed too-old line and skips the outdated check.
If the version can't be read or the check times out, it prints a separate fixed line.
Either way it never reports "up to date" for an apm that would refuse a v4 lock.
Advice lines are fixed text. Every advice line names the chosen binary and contains no command output. A test feeds the hook hostile output (ANSI codes, $(...), backticks) and checks it does not leak into the advice.
The time limits work without GNU coreutils. The hook uses timeout, then gtimeout, and stays silent if neither exists, as on stock macOS. The hook's own budget is 375 s, so hooks.json now allows 400 s.
Versions and approvals:
kyberforge goes from 2.2.1 to 2.3.0.
The root executables.allow key becomes kyberforge#2.3.0, still in the short form. The spike found that 0.39.3 needs the full-identity key form; that change belongs to #271.
Marketplace version 0.9.1, re-packed.
ADR changes:
ADR-0034 gets an amendment: the test seam is a PATH stub of uv, and the invocation is --no-sync --offline. The amendment also states that this repo shows the too-old notice until the #271 cutover.
ADR-0019's time-budget amendment is updated.
docs/hooks.md is updated.
Tests
tests/test-apm-current-hook.sh: 98 passed, 0 failed. The real-apm probe still passes against PATH apm 0.28.0.
Full suite in strict mode: 24 suites passed. pre-commit and the pre-push stage pass.
Review: two clean-context rounds. Round 1 had one blocking finding, the missing timeout on macOS, which is fixed. Round 2 had no blocking findings, and its non-blocking points are applied.
After this merges, this repo's sessions fall back to the global apm 0.28.0, so they show the too-old notice and stop auto-refreshing. This is expected, and the #271 cutover adds the pin that ends it.
After merge
Run scripts/tag-plugin-releases.sh to create kyberforge-v2.3.0. The tag is pushed only on the maintainer's explicit yes (ADR-0032/0033).
Closes #270. Part of spec #268 and milestone 18. The decisions are recorded in ADR-0034.
## What changed
- **`check-apm-current.sh` chooses its apm once.** If the project pins apm-cli in `pyproject.toml`, has a `uv.lock`, and `uv` is on PATH, the hook runs `uv run --project <root> --frozen --no-sync --offline apm`. Otherwise it runs the apm on PATH. If neither exists, it exits 0 and prints nothing. The same binary is used for the outdated check and the update.
- **It never syncs.** uv is only ever called with `run --no-sync --offline`. If the project environment (`.venv` or `UV_PROJECT_ENVIRONMENT`) is missing, the hook does not call uv, because a no-sync run would create an empty `.venv`. It prints a fixed not-synced notice instead.
- **It checks the apm version before the outdated check.**
- If the chosen apm is older than 0.39.2, it prints a fixed too-old line and skips the outdated check.
- If the version can't be read or the check times out, it prints a separate fixed line.
- Either way it never reports "up to date" for an apm that would refuse a v4 lock.
- **Advice lines are fixed text.** Every advice line names the chosen binary and contains no command output. A test feeds the hook hostile output (ANSI codes, `$(...)`, backticks) and checks it does not leak into the advice.
- **The time limits work without GNU coreutils.** The hook uses `timeout`, then `gtimeout`, and stays silent if neither exists, as on stock macOS. The hook's own budget is 375 s, so `hooks.json` now allows 400 s.
- **Versions and approvals:**
- kyberforge goes from 2.2.1 to 2.3.0.
- The root `executables.allow` key becomes `kyberforge#2.3.0`, still in the short form. The spike found that 0.39.3 needs the full-identity key form; that change belongs to #271.
- Marketplace version 0.9.1, re-packed.
- **ADR changes:**
- ADR-0034 gets an amendment: the test seam is a PATH stub of `uv`, and the invocation is `--no-sync --offline`. The amendment also states that this repo shows the too-old notice until the #271 cutover.
- ADR-0019's time-budget amendment is updated.
- `docs/hooks.md` is updated.
## Tests
- `tests/test-apm-current-hook.sh`: 98 passed, 0 failed. The real-apm probe still passes against PATH apm 0.28.0.
- Full suite in strict mode: 24 suites passed. pre-commit and the pre-push stage pass.
- Review: two clean-context rounds. Round 1 had one blocking finding, the missing `timeout` on macOS, which is fixed. Round 2 had no blocking findings, and its non-blocking points are applied.
## Known effect until #271
After this merges, this repo's sessions fall back to the global apm 0.28.0, so they show the too-old notice and stop auto-refreshing. This is expected, and the #271 cutover adds the pin that ends it.
## After merge
Run `scripts/tag-plugin-releases.sh` to create `kyberforge-v2.3.0`. The tag is pushed only on the maintainer's explicit yes (ADR-0032/0033).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
Claude
added this to the Spec: Upgrade apm to 0.39.3 and pin it per repo with uv milestone 2026-12-02 01:05:28 +00:00
The hook now picks one apm and uses it for both the outdated check and the
update (ADR-0034): `uv run --project <root> --frozen --no-sync --offline apm`
when the project pins apm-cli (a quoted apm-cli requirement in pyproject.toml
plus a uv.lock) and uv is on PATH, else the PATH apm, else it exits silently.
uv is only ever called as `uv run`; `--no-sync` keeps a plain run from syncing
the environment, and `--offline` keeps uv off the network.
Before the outdated check it reads `--version`. Below 0.39.2, or when the
version cannot be read, it prints a fixed notice naming the chosen binary and
skips the check, since an older apm refuses a lockfile v4 and would report it
as up to date. All advice strings are fixed literals that name the chosen
binary; no command output is interpolated.
Tests use seam A: a fake uv first on a whitelisted PATH logs every call and
reaches the pinned fake apm only through `uv run`. They cover pin plus uv, pin
without uv, pin without uv.lock, no pin, no apm, too-old and boundary
versions, stale and current output on both paths, and hostile output.
ADR-0034 is amended to record that seam.
Impact: kyberforge 2.2.1 -> 2.3.0, catalog 0.9.0 -> 0.9.1.
Refs: #270
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
Review round 1 of #270.
- Resolve `timeout`, else `gtimeout`, once after choosing apm, and call it
through "$to" at all three sites. Stock macOS has neither `timeout` nor a
GNU coreutils default, so the `--version` call failed there and every
session printed a false too-old notice. With neither binary the hook exits
0 silently. The budget test now parses `"$to" N` too.
- Check that the project environment ($UV_PROJECT_ENVIRONMENT, else
<root>/.venv) exists before taking the uv path. If it is missing, print a
fixed not-synced notice and never call uv, because `uv run --no-sync`
would create an empty .venv in the consumer repo.
- Separate "version too old" from "version unreadable or timed out", with a
fixed literal for each on each path, so a timeout no longer blames an
unsynced environment.
- Raise the hooks.json timeout from 380 to 400 for the 375s script budget,
refresh the outdated-timing comment, and note the budget in ADR-0019.
- Tests: no timeout binary, gtimeout only, missing and relocated project
environment, a failing `uv run`, `--offline` required on every uv call,
and the hostile-output notice compared to its exact literal.
- ADR-0034: until the #271 cutover, this repo prints the too-old notice and
auto-refresh is paused.
Refs: #270
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
Review round 2 of #270, all non-blocking.
- Resolve `timeout`/`gtimeout` before choosing apm, so a machine with
neither stays silent on every path, the uv not-synced notice included.
- The uv-path unreadable-version notice also offers `uv sync --frozen`.
- Tests: a `timeout` shim replaces the real binary in the whitelisted PATH
(and backs `gtimeout`), so the suite runs on macOS without coreutils; add
a PATH-route case where `apm --version` exits 1, and a no-timeout case on
the uv path; fix two stale comments.
- ADR-0034: contract item 1 now spells out `--frozen --no-sync --offline`
and the missing-environment short-circuit; amendment dated 2026-12-02.
- ADR-0019: the 2026-12-02 amendment moves below the 2026-09-16 one.
- docs/hooks.md: rewrap an over-long line.
Refs: #270
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #270. Part of spec #268 and milestone 18. The decisions are recorded in ADR-0034.
What changed
check-apm-current.shchooses its apm once. If the project pins apm-cli inpyproject.toml, has auv.lock, anduvis on PATH, the hook runsuv run --project <root> --frozen --no-sync --offline apm. Otherwise it runs the apm on PATH. If neither exists, it exits 0 and prints nothing. The same binary is used for the outdated check and the update.run --no-sync --offline. If the project environment (.venvorUV_PROJECT_ENVIRONMENT) is missing, the hook does not call uv, because a no-sync run would create an empty.venv. It prints a fixed not-synced notice instead.$(...), backticks) and checks it does not leak into the advice.timeout, thengtimeout, and stays silent if neither exists, as on stock macOS. The hook's own budget is 375 s, sohooks.jsonnow allows 400 s.executables.allowkey becomeskyberforge#2.3.0, still in the short form. The spike found that 0.39.3 needs the full-identity key form; that change belongs to #271.uv, and the invocation is--no-sync --offline. The amendment also states that this repo shows the too-old notice until the #271 cutover.docs/hooks.mdis updated.Tests
tests/test-apm-current-hook.sh: 98 passed, 0 failed. The real-apm probe still passes against PATH apm 0.28.0.timeouton macOS, which is fixed. Round 2 had no blocking findings, and its non-blocking points are applied.Known effect until #271
After this merges, this repo's sessions fall back to the global apm 0.28.0, so they show the too-old notice and stop auto-refreshing. This is expected, and the #271 cutover adds the pin that ends it.
After merge
Run
scripts/tag-plugin-releases.shto createkyberforge-v2.3.0. The tag is pushed only on the maintainer's explicit yes (ADR-0032/0033).🤖 Generated with Claude Code
https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi