fix: honest init detection, --repair path, registry name escaping (closes #440)#460
Open
0xLeif wants to merge 5 commits into
Open
fix: honest init detection, --repair path, registry name escaping (closes #440)#4600xLeif wants to merge 5 commits into
0xLeif wants to merge 5 commits into
Conversation
… name escaping (closes #440)
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
❌ Corvin says...
_
<(;\ .oO(oh no...)
|/(\
\(\\
" "\\
"Caw... your imports are all over the place."
CI Summary
| Check | Status |
|---|---|
| Validate action.yml | ✅ Passed |
| Packaged Action Consumer | ❌ failure |
| Dependency Audit | ✅ Passed |
| Code Coverage | ❌ failure |
| Format Check | ❌ failure |
| Docs Site | ✅ Passed |
| Spec Validation | ❌ failure |
| Tests (build, test, clippy) | ❌ failure |
| VS Code Extension | ✅ Passed |
Powered by corvid-pet
There was a problem hiding this comment.
❌ Corvin says...
_
<(;\ .oO(oh no...)
|/(\
\(\\
" "\\
"I'm pecking through the errors..."
CI Summary
| Check | Status |
|---|---|
| Validate action.yml | ✅ Passed |
| Packaged Action Consumer | ❌ failure |
| Dependency Audit | ✅ Passed |
| Code Coverage | ❌ failure |
| Format Check | ❌ failure |
| Docs Site | ✅ Passed |
| Spec Validation | ❌ failure |
| Tests (build, test, clippy) | ❌ failure |
| VS Code Extension | ✅ Passed |
Powered by corvid-pet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
init/init-registrymisreported or corrupted project state in five ways:initprinted "Detected source directories: src" when nothing was detected. Addedconfig::detect_source_dirs_with_confidencereturning(dirs, actually_detected); init now says "No source directories detected — defaulted to source_dirs = ["src"]" and--jsonemits adetectedboolean..specsync/version,.specsync/.gitignore, orsdd.jsonleft the project broken; re-runninginitjust said "already exists". Addedinit --repair: restores missing support files/dirs without touching the existing config, sanity-checks the config for aspecs_dirkey, and re-init now lists missing support files with a repair hint (text and JSON).init-registry --name— a name containing"or newlines (e.g.evil"\n[specs]\npwned="x) produced invalid/injected registry TOML.generate_registrynow TOML-escapes names and paths.--name ""accepted — now rejected with exit 1..specsyncin subdirectories — runninginitinside a subdirectory of an initialized project created a nested.specsync;find_initialized_ancestornow detects the ancestor project and errors out with guidance. Alsoinit-registrynow respects--json/--format.Regression tests
commands::init::tests::empty_dir_init_reports_fallback_not_detectioncommands::init::tests::repair_restores_deleted_support_filescommands::init::tests::find_initialized_ancestor_detects_parent_projectregistry::tests::generate_registry_escapes_toml_injectionFile overlap notes
src/registry.rsis shared with Local registry parser silently misparses documented [[modules]] format and accepts malformed TOML #413 (disjoint regions: init/init-registry lie about detection and offer no repair path — fake source_dirs, TOML injection via --name, nested .specsync footgun #440 ownstoml_escape/generate_registry, Local registry parser silently misparses documented [[modules]] format and accepts malformed TOML #413 ownsparse_registry_toml); both PRs include the identical full file (blob04c19b38…), so either merge order is clean.src/cli.rsis shared with new --full produces a scaffold that fails the tool's own validation (7 scaffold-marker errors, greedy auto-detect) #442 (identical content in both PRs).src/config.rsis pending: it exceeded the MCP push size limit during publication and is being pushed to this branch separately (blob shaa7c58f4a967906d238717757c13e620279d94367). The branch does not compile until it lands (detect_source_dirs_with_confidenceis defined there).Closes #440