Skip to content

0.6.4: audit fixes - #10

Merged
lawrence3699 merged 6 commits into
mainfrom
fix/audit-0.6.4
Nov 4, 2026
Merged

lawrence3699 merged 6 commits into
mainfrom
fix/audit-0.6.4

Conversation

@lawrence3699

Copy link
Copy Markdown
Owner

Fixes for the package findings of the 2026-11-05 review (pkg-code-*, pkg-pypi-*, pkg-docs-*, mirrors-crosslinks-1/7/8). Model revisions and weights are unchanged; the version is bumped to 0.6.4 (tag and PyPI release are done separately, after merge).

Code

  • Error bodies of both shapes (pkg-code-1, pkg-code-v1): the client (parse_error_body), the guard and the MCP server read the hosted API's flat {"error": "<code>", "message": ...} as well as the nested contract body; no more http_error: unauthorized or AttributeError. JevStyleError.input_too_long covers max_tokens_exceeded (local, 400), input_too_large (hosted, 413) and the pre-0.5.0 input_budget_exceeded. The server keeps 400 max_tokens_exceeded; docs note the hosted 413.
  • Guard fail-closed (pkg-code-3, pkg-code-v2): a 200 without a usable value for every question (no answers, wrong type, no number) is now an error → ask, even with emit_allow. tests/test_guard.py covers thresholds → ask/deny, emit_allow, 4xx flat/nested bodies (real local stub server), malformed 200s.
  • Key routing (pkg-code-2): JEV_STYLE_API_KEY goes only to loopback servers or the server in JEV_STYLE_URL; any other base_url needs an explicit key.
  • MCP (pkg-code-v3, pkg-code-v2): instructions are built per backend (budgets from GET /v1/models; remote --allow-remote --url says the state leaves the machine); HTTP error path tested for both body shapes.
  • Local server (pkg-code-5): Host / Origin check (403 forbidden_host / forbidden_origin), loopback + --host only; --allow-any-host / create_app(allowed_hosts=None) to disable; --host 0.0.0.0 accepts any Host but same-host/loopback Origin only. Tests address the TestClient as http://127.0.0.1.
  • Downloads (pkg-pypi-1, pkg-pypi-v1, pkg-pypi-v2): backend checked before fetching (--no-backend-check to override); GGUF refuses to download while no scorer can be found (--scorer, env, build/ in a cached snapshot, PATH) and says how to get one; download / offline failures are one error: line (DownloadError); missing --model-dir is error: file not found; JEV_STYLE_RELEASE validated before parsing; --backend mlx off Apple silicon points at [torch].
  • Integrity (pkg-code-7): jev-style download verifies against manifest.json by default (--no-verify), serve / decide --verify pass verify=True to the runtime, models.verify_folder().
  • Custom repos (pkg-code-4): trust_remote_code repos get generic per-backend file patterns instead of the 0.8B v3 file names.
  • CLI help (pkg-pypi-5): top-level --help lists all eight commands; guard / guard-replay usage lines carry their own name.

Release, metadata, docs

  • release.yml (pkg-code-6): manual runs publish to TestPyPI only; PyPI only from a version-checked tag. server.json (mirrors-crosslinks-7): description names the current models (2B v4 + 0.8B, text + images), version 0.6.4.
  • pyproject (pkg-pypi-4, pkg-pypi-2, pkg-docs-7): Windows classifier + a windows-latest CI job (no torch); [mlx] pin explained in a comment; Models URL → the Hub profile (the v4 collection has no 0.8B); Discussions URL. NOTICE (pkg-pypi-6) lists 2B v3 / v4 sources.
  • README (mirrors-crosslinks-1, pkg-docs-*): Decision Index 0.3 board entry (2B v4 listed 2026-11-04: Public 44.37 / Full 34.53 / Breadth 41.75; Vision 57.55 / 51.94; 0.8B v3 17.0 / 12.5) replaces "self-run, v3 34.05 on the board" (the outdated banner image is removed); hosted API context 8,192 / input 8,000, no fixed per-account quota, 429 + Retry-After; bare install = client only, [mlx] pin note; key rule; both error shapes; noul / choice examples replace the urgency score ones; Discussions + SECURITY links.
  • Skills (pkg-docs-4, pkg-docs-5): serve / mcp / jev-style cover --release 2b, per-release GGUF scorers, model starting with jev-style-; stale "mcp extra" advice dropped; guard numbers marked as 0.8B v3; reference.md error table gains the hosted rows.
  • SECURITY.md, CODE_OF_CONDUCT.md, PR template, issue config → Discussions (pkg-docs-12).

Verification

pytest -q: 290 passed (233 before). uv build + twine check --strict pass. CLI smoke: --help, decide --fake, guard-replay --fake, eval --fake, JEV_STYLE_RELEASE=9b → one-line error.

🤖 Generated with Claude Code

Error bodies of both shapes (hosted flat + nested), input-too-long alias,
API key only to loopback / JEV_STYLE_URL; guard treats a 200 without usable
answers as "ask"; MCP instructions built per backend; local server refuses
cross-site Host / Origin; download checks the backend and the GGUF scorer
before fetching, verifies against manifest.json, and reports failures in one
line; custom trust_remote_code repos get a generic file list; CLI help lists
every command; release workflow publishes to PyPI from tags only; Windows CI
job and classifier; NOTICE covers the 2B v3 / v4; README, skills and
reference updated (Decision Index board entry, hosted API limits, [mlx] pin,
noul / choice examples); SECURITY.md, CODE_OF_CONDUCT.md, PR template.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 19:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

lawrence3699 and others added 3 commits November 5, 2026 06:26
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…out the urgency score

Verification of the 0.6.4 audit branch found two leftovers:

- cli.main checked JEV_STYLE_RELEASE before dispatching every command, so a stray value made
  `jev-style guard` exit 2 and turned each tool call into a blocking hook error. The guard never
  loads a model and its contract is "always exit 0, ask on any problem", so it is exempt now
  (test_guard_hook_ignores_a_bad_env_release).
- skills/jev-style/reference.md still showed an "urgency" score answer in the example response;
  it now mirrors the SKILL.md request (refund / team / topic choice).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Since the JEV_STYLE_API_KEY rule (sent only to loopback or to $JEV_STYLE_URL), `jev-style decide
--url https://...` had no way to pass a key except by also setting JEV_STYLE_URL to the same server.
`eval` has `--key` and cascade tiers have `api_key_env`; `decide` now has `--api-key-env NAME`, like
`serve` and `mcp`. An empty or unset variable is a one-line error. README, client docstring and
CHANGELOG say so; test_decide_url_takes_an_explicit_key covers the three cases.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@lawrence3699

Copy link
Copy Markdown
Owner Author

Verification pass (fresh clone, Python 3.12 venv, .[dev] only, no torch/mlx):

  • pytest -q: 292 passed (290 on the branch as opened, +2 tests added here). python -m build + twine check --strict pass; the wheel's METADATA carries License-Expression: Apache-2.0, License-File: LICENSE / NOTICE, the Windows classifier and the new Models / Discussions URLs. The wheel installs in a clean venv and runs the release workflow's smoke.
  • Error bodies: the live api.jevstyle.com 401 ({"error":"unauthorized","message":...}) is parsed as unauthorized by the client, guard.error_fields and the MCP HttpBackend; nested, bare-message and non-JSON bodies covered; 413 input_too_large / 400 max_tokens_exceeded / 422 input_budget_exceeded all set input_too_long.
  • Guard: a 200 with no / partial / wrong-type / non-numeric answers is ask (source error) even with emit_allow; thresholds still produce allow/ask/deny.
  • Downloads: download --backend torch|mlx on a bare install, serve|decide --backend gguf without a scorer, HF_HUB_OFFLINE=1, and a missing --model-dir all stop with one error: line and the HF cache stays empty. All 9 pinned repos (and their bf16/8bit, F16/Q8_0/Q4_K_M variants) have a manifest.json whose sizes and sha256 match the Hub's file metadata, so the default download --verify passes on real repos.
  • Serve: with a real serve --fake, loopback Host / [::1] / localhost:3000 Origin / same-origin Playground POST pass; spoofed Host, cross-site text/plain POST and Origin: null get 403; --host 0.0.0.0 accepts any Host but refuses foreign Origins; --allow-any-host accepts everything. The Python client, the MCP HttpBackend and jev-style guard --check all work against it unchanged.
  • release.yml: pypi runs only on ref_type == 'tag', testpypi only on dispatch; version is 0.6.4 in __init__.py, server.json (both fields) and CHANGELOG. All 68 README links answer 200 (SECURITY.md 404s on main only until this merges). The Decision Index figures match data/index.json (public 44.37, balanced 34.53, breadth 41.75; 0.8B 17.0 / 12.5).

Two fixes pushed on top (763d733, 9df2666): jev-style guard is exempt from the new JEV_STYLE_RELEASE gate (a hook must exit 0), the reference.md example answer no longer shows an urgency score, and decide --url gets --api-key-env so a non-loopback server can be given a key explicitly (eval and cascades already had their own). CI is green on 9df2666.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lawrence3699 added a commit that referenced this pull request Nov 4, 2026
Port the content changes of #10 (fix/audit-0.6.4) into the restructured
README so that, once #10 is merged, README.md can be resolved by taking
this branch's version:

- Decision Index 0.3: the public board entry (2026-11-04, jev-style-2b-v4:
  Public 44.37, Full 34.53, Breadth 41.75; Vision 57.55 / 51.94; 0.8B v3
  17.0 / 12.5) replaces the self-run wording, with one line on Public vs
  Full. The outdated 2B v4 banner is no longer shown.
- Hosted API section: jev-style-2b-decision-v4, text only, 8,192-token
  context, 8,000-token inputs, no fixed per-account quota, 429 with
  Retry-After, 413 input_too_large vs the local 400 max_tokens_exceeded.
- Install commands carry the [torch] / [mlx] extras (also in the
  comparison table); the bare install and the mlx-lm 0.31.3 pin are
  explained.
- noul / choice examples (team routing, refund, phishing, topic, tool
  choice) in place of the urgency and frustration score examples.
- Key rule, both error-body shapes, Host / Origin check, download and
  --verify integrity checks, guard "200 without usable answers is ask",
  guard numbers measured with the 0.8B v3, MCP instructions, llama.cpp
  download-first steps, Discussions and SECURITY.md.

Review fixes: Models link and WEIGHTS badge point at the Hub profile
(the v4 collection has no 0.8B); Kev's smallest download is Kev-0.8B;
"Train on your own labels" is "no"; the roadmap is marked as ideas with
no dates and its open items as proposals; the Hub library line names the
main (PyTorch) model pages; "Used by" keeps only entries that could be
checked. README.zh-CN.md gets the same changes; CITATION.cff is 0.6.4.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…tyle.com homepage; Context7 and Glama files

- jev-style-serve: install uv with brew or pipx instead of `curl ... | sh`, which skill scanners
  flagged as a supply-chain risk.
- jev-style-guard: describe what it blocks in words (recursive deletes, force-pushes, key exfiltration).
- Both plugin manifests: homepage https://jevstyle.com/.
- context7.json and glama.json for Context7 and the Glama MCP directory (not in the sdist or wheel).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@lawrence3699

Copy link
Copy Markdown
Owner Author

Added ec8873b from the 2026-11-05 SEO/GEO audit. It changes metadata only; no code paths change.

  • jev-style-serve skill: the curl … | sh uv install line is replaced with brew install uv / pipx install uv. Skill directories graded this skill F for that line.
  • jev-style-guard skill: the description now says "recursive deletes, force-pushes or key exfiltration" instead of literal commands.
  • Plugin manifests: both now use homepage: https://jevstyle.com/, so plugin listings link to the site instead of only GitHub.
  • Directory files: context7.json (Context7) and glama.json (Glama MCP directory claim) are added at the repo root. Neither file is in the sdist or wheel; I checked both build outputs.
  • CHANGELOG: one new 0.6.4 bullet.

pytest: 292 passed. No real models were loaded.

🤖 Generated with Claude Code

@lawrence3699
lawrence3699 merged commit 4c49bf7 into main Nov 4, 2026
8 checks passed
@lawrence3699
lawrence3699 deleted the fix/audit-0.6.4 branch November 4, 2026 21:52
lawrence3699 added a commit that referenced this pull request Nov 4, 2026
…E, CITATION.cff, logo, social preview (#9)

* README: restructure like the larger decision-model repos; add zh-CN README, CITATION.cff, logo and social preview

Quick start and the reasons to use it come first, then one model table with a recommendation, a comparison with
hosted Jev, Kev and Laya, the agent tooling, and new sections: how it works, limitations, used by and mentioned in,
roadmap, citation. The identity, training-source and service-status statements move to "About the project" at the
end, unchanged in substance. The mcp-name line stays. Docs only: no runtime, dependency or model-revision change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* README: carry over the 0.6.4 README content and fix review findings

Port the content changes of #10 (fix/audit-0.6.4) into the restructured
README so that, once #10 is merged, README.md can be resolved by taking
this branch's version:

- Decision Index 0.3: the public board entry (2026-11-04, jev-style-2b-v4:
  Public 44.37, Full 34.53, Breadth 41.75; Vision 57.55 / 51.94; 0.8B v3
  17.0 / 12.5) replaces the self-run wording, with one line on Public vs
  Full. The outdated 2B v4 banner is no longer shown.
- Hosted API section: jev-style-2b-decision-v4, text only, 8,192-token
  context, 8,000-token inputs, no fixed per-account quota, 429 with
  Retry-After, 413 input_too_large vs the local 400 max_tokens_exceeded.
- Install commands carry the [torch] / [mlx] extras (also in the
  comparison table); the bare install and the mlx-lm 0.31.3 pin are
  explained.
- noul / choice examples (team routing, refund, phishing, topic, tool
  choice) in place of the urgency and frustration score examples.
- Key rule, both error-body shapes, Host / Origin check, download and
  --verify integrity checks, guard "200 without usable answers is ask",
  guard numbers measured with the 0.8B v3, MCP instructions, llama.cpp
  download-first steps, Discussions and SECURITY.md.

Review fixes: Models link and WEIGHTS badge point at the Hub profile
(the v4 collection has no 0.8B); Kev's smallest download is Kev-0.8B;
"Train on your own labels" is "no"; the roadmap is marked as ideas with
no dates and its open items as proposals; the Hub library line names the
main (PyTorch) model pages; "Used by" keeps only entries that could be
checked. README.zh-CN.md gets the same changes; CITATION.cff is 0.6.4.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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.

2 participants