Skip to content

chore: update code-shape-kit to v0.2.2 - #25

Merged
emanuilo merged 6 commits into
mainfrom
chore/code-shape-kit-0.2.0
Nov 24, 2026
Merged

emanuilo merged 6 commits into
mainfrom
chore/code-shape-kit-0.2.0

Conversation

@emanuilo

Copy link
Copy Markdown
Owner

Summary

Upgrades code-shape-kit v0.1.3 → v0.2.2 and fixes what its new gates find, keeping the baseline empty.

 pyproject.toml
-  code-shape-kit @ v0.1.3
+  code-shape-kit @ v0.2.2              (python_full_version >= 3.11.4)
+  [tool.shape] output_modules           cli, __main__, the Cursor hook script (it answers Cursor by printing JSON)
+  [tool.shape.error_boundaries]         13 functions that deliberately catch everything and keep going, each with a reason
+.github/CODEOWNERS                      pyproject.toml, .code-shape/, .githooks/, .claude hook files, ci.yml
 CONTRIBUTING.md                        new gates, no suppressions, "Catching every error"

New findings and how they were handled:

unused `# type: ignore` (2), suppressions (3)   removed; get_embeddings typed without one
True/False by position (2)                      passed by keyword
catch-all that swallows the error (39)
  3   fixed: extract_urls catches ValueError; reminder loop's re-raise-only try removed
  23  log with logger.exception (traceback kept; same catch, same continue/return)
  13  error boundaries (loops that must keep running, normal fallbacks, errors shown to the user)
print() (1)                                      Cursor hook script listed in output_modules

Evidence

  • Before (v0.2.0): code-shape check → 47 new findings.
    After (v0.2.2): code-shape check passed: 0 new, 0 worse; baseline "entries": {}; "Accepted error boundaries" lists 13 functions / 14 catches.
  • Fresh clone running the CI shape-job commands passes; uv.lock changes only the kit lines.
  • pytest: 620 passed, 20 skipped. ruff clean. Every commit went through the pre-commit hook.

Merge Danger

Door: two-way

Blast Radius: logs + contributors

  • More ERROR-level log lines with tracebacks where errors were caught before (23 spots; the tool executor and link summarizer now also log). Behaviour (catch, continue, returned text) unchanged.
  • The shape group needs Python ≥ 3.11.4.
  • New gates apply to every future change: no suppression comments, no swallowed errors outside the reviewed boundaries list, no print() outside output_modules. Changes to the rule files need code-owner review.

🤖 Generated with Claude Code

…t one

The MCP server decorators no longer need ignore[untyped-decorator], and
get_embeddings collects its vectors by index so it returns
list[np.ndarray] without ignore[return-value].
_match_type(in_vector=, in_keyword=) and _print_intro(reconfigure=) say
at the call what the flag means.
extract_urls only skips the URLs urlparse rejects (ValueError) instead
of every exception, and the reminder loop drops a try/except that only
re-raised CancelledError around its sleep.
From code-shape-kit's CODEOWNERS template: pyproject.toml, the baseline,
the commit hooks and the CI workflow need the maintainer's approval once
branch protection requires code-owner review.
The catch-all handlers that log and carry on now log with logger.exception,
so the traceback is kept. Same messages, same control flow. The tool
executor and the link summarizer, which returned the error without logging
it, now log it too.
- Pin the shape group to v0.2.2; it needs Python 3.11.4+, so the marker
  is python_full_version >= '3.11.4'. Only the kit's lines move in uv.lock.
- output_modules: the entry points plus the Cursor hook script, which
  answers Cursor by printing JSON.
- error_boundaries: the 13 functions that deliberately catch every error
  without a traceback, each with its reason.
- CONTRIBUTING: the new gates, suppression comments, printing, error
  boundaries and CODEOWNERS.
@emanuilo
emanuilo merged commit 4c11946 into main Nov 24, 2026
5 checks passed
@emanuilo
emanuilo deleted the chore/code-shape-kit-0.2.0 branch November 24, 2026 10:00
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