Skip to content

fix(checks): assert a CPython floor, not one exact minor - #9

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/python-check-env-ownership
Oct 20, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/python-check-env-ownership

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

The two interpreter checks hard-coded one exact minor:

- check: the interpreter reports a CPython 3.13 version
  stdout: [{contains: "3.13"}]
- check: … and reports major.minor 3 13
  stdout: [{contains: "3 13"}]

That asserts a property of this layer's own pixi.toml against every image that
composes it — which is not the layer's contract. An image's pixi environment belongs to
whichever candy ships the pixi.toml it is built from, so a consumer may legitimately
run a different minor. open-webui requires >=3.11,<3.13 (0.9.5 and 0.12.3 alike),
so the openwebui image runs 3.12.13 and its whole check bed stopped at
check-image on these two steps — making the runtime half of that gate unreachable
for it (#8).

This asserts the floor instead — what the layer actually guarantees:

- check: the interpreter is a CPython at or above the supported floor (3.11) — the exact
    minor belongs to whichever candy owns the image's pixi.toml, not to this layer
  exit_status: 0
  stdout: [{contains: "CPython 3."}]
  command: …/python -c "import platform, sys; assert sys.version_info >= (3, 11), sys.version_info; print(platform.python_implementation(), '%d.%d' % sys.version_info[:2])"
- check: the interpreter executes a standard-library snippet (incl. the sqlite3 C extension) and satisfies the same floor
  exit_status: 0
  stdout: [{contains: "stdlib-ok"}]
  command: …/python -c "import sys, json, sqlite3; assert sys.version_info >= (3, 11), sys.version_info; json.dumps([1]); sqlite3.connect(':memory:').execute('select 1').fetchone(); print('stdlib-ok', sys.version_info.major, sys.version_info.minor)"

The version enforcement lives inside the interpreter, so a missing, Python-2 or
too-old interpreter still fails — the checks are weaker in exactly one dimension (which
minor) and unchanged in the dimensions that matter (it exists, it runs, it has the C
extension). A consumer that needs an exact version asserts it in its own plan:.

Docs move with the code (R2): the candy description:, a new "Environment ownership"
section in the skill body, and the README all now say the >=3.13,<3.14 pin is this
layer's default and the check is a floor.

How tested

Run on the committed tree at head 25315cf.

$ charly -C <worktree> box validate
charly box validate: OK — checked 3 candies, 7 distros, 7 builders; 0 warnings, 0 errors

$ git diff --stat origin/main...HEAD
 .agents/skills/python/SKILL.md | 15 +++++++++++++++
 README.md                      | 12 +++++++++---
 charly.yml                     | 26 ++++++++++++++++----------
 3 files changed, 40 insertions(+), 13 deletions(-)

The decisive test — the real interpreter that the old assertion rejected. Both new
commands were run against the interpreter inside the built openwebui image (the exact
3.12.13 that failed before):

interpreter: /home/user/.pixi/envs/default/bin/python
Python 3.12.13
--- check 2 (was: contains 3.13) ---
CPython 3.12
check-2 exit=0                     # stdout contains "CPython 3." → PASS
--- check 3 (was: contains '3 13') ---
stdlib-ok 3 12
check-3 exit=0                     # stdout contains "stdlib-ok" → PASS

The assertion is live, not a string that always matches. The same command with the
floor raised past reality fails inside Python:

--- negative control: the same assertion against an unreachable floor ---
AssertionError: sys.version_info(major=3, minor=12, micro=13, releaselevel='final', serial=0)

Scope note. This repo's gate is the org-wide charly/pr-validator (it ships only
.github/workflows/tag-on-merge.yml; its AGENTS.md says so explicitly), and the
candy's plan: checks are its functional evidence. The end-to-end bed proof lands one
step downstream, because pod-openwebui pins this repo by tag: the floor fix must be
merged and tagged, then that pin advances (opencharly/pod-openwebui#13), and
check-openwebui-pod reaches a fully green bed — which is precisely the R10 witness
opencharly/pod-openwebui#12 could not obtain.

Filed issues

Rulebook compliance

  • R1 — RCA every anomaly. The red bed was root-caused before changing anything: the
    failing check ids (layer-python:1/2), the lock's python-3.12.13 on both sides, and
    upstream's Requires-Python: <3.13.0a1 for open-webui — all measured, in the 3.13 interpreter checks cannot pass for a consumer that must pin <3.13 (open-webui requires <3.13.0a1), which reds the consumer's whole check bed #8.
  • R2 — finish the cutover. Candy description, skill body and README changed with the
    checks; no surviving claim that the plan pins 3.13.
  • R3 — no duplication. One assertion of the floor, one stdlib probe; nothing copied.
  • R4 — no workarounds. No skip, no || true, no test deleted: the assertion moved
    into the interpreter rather than being loosened into a substring that cannot fail.
  • R5 — no legacy. The old exact-minor assertions are gone, not disabled.
  • R7 — prove behaviour. The changed steps were executed against the real interpreter
    in a real built image, with a negative control proving they can still fail.
  • R8 — emitted artifacts. The evidence is the interpreter's own output inside the
    image, not the manifest.
  • R9 — binary equals source. Gate run with charly 2026.293.1538, built from
    charly origin/main.
  • R10 — fresh disposable proof. The full bed proof is downstream (see the scope note
    and #13); this PR's changed paths ran live, and the tier below says exactly that.

Change classification

Config (candy plan checks) + docs — charly.yml and two .md files. Confidence:
analysed on a live system — the changed check commands ran against the real 3.12.13
interpreter in the built openwebui image with a negative control, but the end-to-end
bed that proves them in place needs the downstream pin bump (#13) and did not run here.

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

The two interpreter checks hard-coded 3.13 ("contains 3.13" / "contains 3 13"), which
asserted a property of THIS layer's pixi.toml against every image that composes it.
That is not the layer's contract: an image's pixi environment belongs to whichever
candy ships the pixi.toml it is built from, so a consumer may legitimately run another
minor. open-webui requires >=3.11,<3.13 (0.9.5 and 0.12.3 alike), so the openwebui
image runs 3.12.13 — and its whole check bed stopped at check-image on these two
steps, making the runtime half of that gate unreachable (#8).

Assert the floor instead: a CPython at or above 3.11, with the version enforcement
inside the interpreter (so a missing, Python-2 or too-old interpreter still fails) and
the stdlib + sqlite3 probe kept. An image that needs an exact minor asserts it in its
own plan.

Verified against the real 3.12.13 interpreter in the openwebui image — the exact case
the old assertion rejected: both new steps pass ("CPython 3.12", "stdlib-ok 3 12"), and
the same command with the floor raised to 3.99 raises AssertionError, so the assertion
is live rather than a string that always matches.

Docs move with it (R2): the candy description, the skill body's new "Environment
ownership" section, and the README all now state that the pin is this layer's default
and the check is a floor.

Closes #8

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 25315cf181570958fd6bfd31a7aafd023dca0607 (branch: fix/python-check-env-ownership)

Security screen: PASS (no secrets, no guardrail weakening, no injected directives; T4 N/A — validator/rulebook untouched).
Checklist: All applicable rules PASS or NA. Config(candy plan checks)+docs change; box validate green at 0 warnings; changed commands executed live against the real 3.12.13 interpreter with a negative control; tier analysed on a live system is honest; docs (candy description, skill, README) moved with the code; end-to-end bed is downstream-only by repo design and filed (#13). ADE satisfied (non-empty description + deterministic plan checks). Placement CORRECT (candy-layer config + docs). No comments to disposition (0-thread).

Non-blocking notes (not verdict-affecting): (1) stdout: contains "CPython 3." narrows slightly below the stated "≥3.11, unbounded" intent (a hypothetical CPython 4.x would fail) — theoretical only; (2) the Assisted-by model string deepseek-v4.1-flash is not cross-checkable from the provided evidence (tool-limited disposition, tier itself is not inflated).

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 20, 2026 19:21
@github-actions
github-actions Bot merged commit d0d1335 into main Oct 20, 2026
1 check passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 20, 2026
github-actions Bot pushed a commit to opencharly/pod-openwebui that referenced this pull request Oct 20, 2026
…he HTTP check wait for first boot (#14)

* chore(deps): pin the python layer past its floor-check fix, and let the HTTP check wait for first boot

Two changes, one purpose: make this candy's check bed reachable and green — which is
the R10 witness #12 could not obtain.

1. `layer-python` pin v2026.273.1820 -> v2026.293.1922. The old tag carried a hard-coded
   CPython 3.13 assertion; this image runs 3.12.13 because open-webui requires
   `<3.13`, so every bed built from this candy died in `check-image` and its runtime
   half never ran (opencharly/layer-python#8, fixed by opencharly/layer-python#9).

2. The HTTP probe now waits for the app instead of assuming it is up. Open Web UI runs
   its Alembic migrations and builds the model cache before uvicorn binds, so on a cold
   deployment a single unconditional GET hits the port forwarder with nothing behind it
   and is reset — measured: the live phase failed on this step ~8s into a cold bed.
   `eventually: 3m` + `retry_interval: 2s` is the engine's readiness primitive (bounded
   probing, never a fixed sleep); the same single request still asserts steady state.

Measured on the full disposable bed after both changes: `PASS (steps=16)`,
`check-image 42/0/11`, `check-live 49/0/4`, `check-live-rebuild 49/0/4`, and the HTTP
probe reporting `attempts=45, elapsed=1m37.539s, status=200` — the wait doing exactly
the job it exists for, then passing.

Closes #13

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)

* docs: file the in-development-candy gap instead of only working around it

The review is right. This branch's body surfaced a real product defect — `discover:`-ing a
candy repo leaves an empty candy identity and panics `deploykit.CandyCopySource`
(`CandyMapKey == ""`) on `box generate`, and a box's `candy:` list has no local-source ref
form at all — and then carried on with a byte-identical copy without filing it. That is
the surfaced-but-unaddressed split the rulebook forbids.

Filed as opencharly/charly#999, naming both halves and a suggested fix for each. The body
now lists it under `## Filed issues`, and the provenance paragraph cites it at the point
where the workaround appears.

No code change: the pin, the readiness contract, and the green-bed evidence are unchanged.

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
github-actions Bot pushed a commit to opencharly/marketplace that referenced this pull request Oct 21, 2026
#517)

The corpus is a projection of the refs list, and the refs list was behind reality:
`opencharly/pod-openwebui` was pinned at **v2026.274.0629** while the merged candy is
**v2026.293.1944**. Because the generator projects the PINNED sources, the published
`openwebui` skill was still describing the pre-0.12.3 candy — a regeneration against the
unchanged list is a byte-for-byte no-op, which is how the staleness stayed invisible.

Two changes, one cause:

1. `candy/charly-marketplace/charly.yml`: the pod-openwebui ref advances
   `v2026.274.0629` -> `v2026.293.1944`.
2. `charly marketplace generate` re-projects the corpus. It picks up:
   - `openwebui/skills/openwebui/SKILL.md` (+176/-23) — the 0.12.3 pin, the recorded
     upstream contract, and the corrected provider/readiness guidance from
     opencharly/pod-openwebui#12 and #14;
   - `languages/skills/python/SKILL.md` (+15) — the environment-ownership section from
     opencharly/layer-python#9, which had landed but was never projected.

The python file moving here is the tell that this is a stale-corpus repair rather than a
one-repo bump: both skills were already merged; only the projection was behind.

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
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.

1 participant