shiguredo/swidden
57.9
Adequate · 15 November 2026
685
lines of production code
Erlang
primary language
4
measurements over time
What this system is
Swidden is an Erlang-based HTTP API framework built on Cowboy that routes POST requests to handler modules based on a service-version-operation pattern. It enforces input validation using JSON Schema and supports custom middleware and interceptors. The system includes a test client and comprehensive tooling for development and code quality.
Features
Added JSON schemas and dispatch configuration for the spam API
The application now includes a dispatch configuration file and a set of JSON Schema definitions for the 'spam' and 'spam\_admin' API areas. These schemas define the expected input structures for various endpoints, such as user creation, updates, and metrics retrieval, using JSON Schema draft-06. This change establishes the validation rules and routing mappings for these specific API handlers.
priv · high confidence
Initial release of the Swidden HTTP API framework
Introduces the Swidden application (version 2026.2.1), an Erlang-based HTTP API framework built on Cowboy. It provides a dynamic dispatch mechanism that routes POST requests to handler modules based on a service-version-operation pattern defined in a dispatch configuration file. The framework includes built-in JSON schema validation using Jesse, request body size limiting (8MB), and support for custom interceptors and middleware. It also exposes a test client module for making HTTP requests to the running API.
src · high confidence
Initial release with Cowboy 2.19.0, Erlang/OTP 29.0 requirement, and new pre-commit tooling
This entry establishes the baseline for the project, introducing a header-based HTTP API framework. It requires Erlang/OTP 29.0 or later and upgrades the HTTP stack to Cowboy 2.19.0 and Gun 2.6.0, while switching the JSON library to the shiguredo\_jsone fork (2025.1.0). The build and development workflow is updated to use rebar3 with a minimum OTP version of 29.0, and replaces the previous linting/formatting tools (rebar3\_efmt, rebar3\_lint, elvis) with a new pre-commit setup using \prek\ and the \shiguredo/erlang-pre-commit\ repository for \efmt\ and \elint\. Documentation and configuration files such as AGENTS.md, CLAUDE.md, and prek.toml are added to define coding standards and repository-specific settings.
(repo-wide) · high confidence
Behavioural changes
Migrate JSON Schema validation from shiguredo\_jesse to jsone\_schema
The JSON Schema validation implementation has been replaced with the \jsone\_schema\ module from the jsone library, removing the dependency on \shiguredo\_jesse\. This change updates the internal API handler to use \jsone:decode/1\ and \jsone\_schema:validate\_key/2\ directly, which corrects previous behavior where malformed JSON bodies were incorrectly reported as \InvalidJSON\ instead of \MalformedJSON\, and eliminates the leakage of server absolute paths in error responses by removing the \$id\ injection that occurred with the previous library.
issues · high confidence
Test coverage
Added test suite for Swidden API handlers and middleware
Added comprehensive EUnit tests for the Swidden HTTP API, including test helpers and mock handlers (\sample\_interceptor\, \sample\_middleware\, \spam\_user\_handler\, etc.). The tests verify core API behaviors such as successful CRUD operations, error handling for invalid JSON or missing bodies, redirect logic, interceptor execution, and middleware integration. It also includes unit tests for the \pascal2snake\ utility function and verifies service dispatching across different API versions.
test · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 55 → 58 (+2.7)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 73 → 72 (-0.8)
- Architecture 69 → 69 (+0.0)
- Maturity 60 → 74 (+14.6)
- Readiness 42 → 42 (+0.0)
- Security 89 → 83 (-5.9)
Resolved (3)
- Classify ADR enforcement: JSON Schema 検証を shiguredo_jesse から jsone の JSON Schema 実装へ移行する (issues/0001-change-replace-jesse-with-jsone.md)
- Medium CVE: EEF-[CVE redacted] (rebar.lock)
- Medium CVE: [GHSA redacted] (rebar.lock)
New (3)
- Edited copy of a member (11 corresponding lines) (src/swidden_api_handler.erl)
- Medium CVE: EEF-[CVE redacted] (rebar.lock)
- Medium CVE: EEF-[CVE redacted] (rebar.lock)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
shiguredo/swidden was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 5d080180dfbcf8a12e8e333dec498a4dbb9b139e — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.