Delegate fledge spec check to the real specsync binary for CI parity#424
Conversation
β¦parity
fledge's built-in `spec check` only validated spec *structure* (frontmatter,
required sections, files exist). CI runs `CorvidLabs/spec-sync`, which also
parses each governed source file's public exports and fails when they drift
from the spec's Public API tables. The two checkers were orthogonal, so a spec
could pass `fledge spec check` locally yet fail spec-sync in CI.
When the `specsync` binary is on PATH, `spec check` now shells out to it
(`specsync check --force --format json --root <root>`, plus `--strict`),
guaranteeing identical results to CI by construction, and renders the findings
in fledge's style. When absent, it falls back to the structural check with a
`cargo install specsync` hint. JSON output gains an `engine` field
("specsync" | "structural").
- src/spec/engine.rs (new): find_specsync + try_check_via_specsync, with tests
- src/spec/commands.rs: delegate first, structural fallback + hint, engine field
- src/spec/mod.rs: register engine module
- specs/spec/spec.spec.md: v12, document the new engine module
Verified against specsync v4.5.0 built from source: `spec check --strict`
reports 0 errors / 0 warnings / exit 0 against this repo.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request retires the standalone fledge site by replacing all pages and the RSS feed with redirects to the CorvidLabs hub, and updates the CLI's spec check command to delegate to the real specsync binary when available. Feedback on these changes suggests passing the root path as an OsString to avoid lossy UTF-8 conversions when executing specsync, and returning a valid XML feed instead of HTML for rss.xml to prevent content-type parsing errors in RSS readers on static hosts like GitHub Pages.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
3ff48d6 to
650ae57
Compare
There was a problem hiding this comment.
β Corvin says...
_
<(^\ .oO(Caw! ^v^)
|/(\
\(\\
" "\\
"Looking sharp! Like a beak should be."
CI Summary
| Check | Status |
|---|---|
| Dependency Audit | β Passed |
| Integration (3 OS) | β Passed |
| Lint (fmt + clippy) | β Passed |
| Spec Validation | β Passed |
| Tests (3 OS) | β Passed |
Powered by corvid-pet
Summary
fledge spec checkonly validated spec structure (frontmatter, required sections, files exist). CI runsCorvidLabs/spec-sync, which additionally parses each governed source file's public exports and fails when they drift from the spec's Public API tables. The two checkers were orthogonal β a spec could passfledge spec checklocally yet fail spec-sync in CI (the green-locally/red-in-CI trap).This closes the gap by construction: when the
specsyncbinary is onPATH,spec checkshells out to it (the same binary CI runs), so a local pass guarantees a CI pass. When absent, it falls back to today's structural check with an install hint.Rather than re-implement spec-sync's ~3.7k-LOC, per-language export-AST layer inside fledge (which would just create a second checker that drifts from upstream), we delegate to the real, separately-versioned tool.
Changes
src/spec/engine.rs(new) βfind_specsync(PATH lookup) +try_check_via_specsync. Invokesspecsync check --force --format json --root <root>(+--strict), parses the{passed, errors, warnings, stale, specs_checked}report, renders fledge-style.--forcemirrors the CI action so results match a fresh run, not the local hash cache.src/spec/commands.rsβ delegation runs first; structural fallback +cargo install specsynchint when absent. JSON output gains anenginefield ("specsync"|"structural").src/spec/mod.rsβ registers the module.specs/spec/spec.spec.mdβ v12, documenting the newenginemodule.Behavior
fledge spec checkspecsyncon PATHspecsyncabsentNote: delegation runs whatever
specsyncis installed. CI currently pinsv4.3.2; for byte-identical parity, contributors should install the pinned version.Test Plan
specsyncv4.5.0 from source;fledge spec check --strictthrough it reports 0 errors / 0 warnings / exit 0 against this repo (engine=specsync)check --force --format json --root β¦ [--strict]), non-zero exit on findings, both render branchescargo test,cargo clippy -- -D warnings,cargo fmt --checkall passπ€ Generated with Claude Code