Repository navigation
fix(workspace): ship nested scaffold docs + fix imageless DEVKIT_ORG default (#953, #954) - #956
Merged
Merged
Conversation
…d upgrade An upgrade where the consumer already carries root README.md/CHANGELOG.md must still copy the devkit-authored nested docs (.devcontainer/README.md, .devcontainer/CHANGELOG.md, .claude/skills/*/README.md). The unanchored preserve excludes drop them by basename at every depth, so this fails RED. Refs: #953
… ship PRESERVE_FILES lists bare names (README.md/CHANGELOG.md) to protect the consumer's ROOT docs. The copy built `--exclude=$preserved` (no leading slash), so rsync matched by basename at every depth and silently dropped devkit-authored NESTED docs (.devcontainer/README.md, .claude/skills/*/ README.md) while the preview promised them under ADDED. Anchor each exclude to the transfer root (`--exclude=/$preserved`), matching is_preserved_file's exact-path semantics: root docs still preserved, nested docs now copied. Refs: #953
Under --no-prompts with no ORG_NAME env and no manifest DEVKIT_ORG, the org must come from the owner segment of GITHUB_REPOSITORY, not the hardcoded "vigOS/devc" literal that a '/'-bearing org substitutes into generated files (LICENSE copyright). Fails RED: current code persists vigOS/devc. Refs: #954
On --no-prompts with no ORG_NAME env and no manifest DEVKIT_ORG, ORG_NAME
defaulted to the hardcoded literal "vigOS/devc" — a bogus org whose '/' gets
sed-substituted into {{ORG_NAME}} in generated files (e.g. the LICENSE
copyright line). GITHUB_REPOSITORY (owner/repo) is already available on this
path (DEVKIT_REPO uses it), so default the org to its owner segment, falling
back to the sane literal "vigOS" only when no usable owner/repo is present.
Also records the #953 and #954 fixes in the CHANGELOG (both delivered in this
PR share one Unreleased entry, mirrored into the scaffold changelog).
Refs: #954
c-vigo
enabled auto-merge
July 9, 2026 11:56
Contributor
Author
|
Reviewed: both fixes match the filed root causes and are minimal — #953 root-anchors the preserve excludes ( |
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.
Two related
assets/init-workspace.shbug fixes, TDD, one PR intodev.#953 — scaffold copy drops nested README.md/CHANGELOG.md
Problem:
PRESERVE_FILESlists bare names (README.md,CHANGELOG.md) to protect the consumer's ROOT docs. The copy built--exclude=$preserved(no leading slash), so rsync matched by basename at every depth and silently dropped devkit-authored NESTED docs (.devcontainer/README.md,.devcontainer/CHANGELOG.md,.claude/skills/*/README.md) on--forceupgrades — files the--previewreport (exact-pathis_preserved_file) still promised under ADDED.Fix: root-anchor each exclude (
--exclude=/$preserved), matchingis_preserved_file's exact-path semantics. Root docs stay preserved; nested docs now ship.RED→GREEN: new bats test seeds a consumer root
README.md/CHANGELOG.md, runs a--forceupgrade, then asserts the root docs are preserved AND.devcontainer/README.md,.devcontainer/CHANGELOG.md,.claude/skills/inception_explore/README.mdwere copied. Failed on the nested-doc assertion before the fix; green after.#954 — imageless
--no-promptsdefaults org to literalvigOS/devcProblem: under
--no-promptswith noORG_NAMEenv and no manifestDEVKIT_ORG, the org defaulted to the hardcodedvigOS/devc— a bogus/-bearing org that sed-substitutes into{{ORG_NAME}}in generated files (e.g. the LICENSE copyright line).GITHUB_REPOSITORY(owner/repo) is already available on this path (DEVKIT_REPOuses it) but ORG ignored it.Fix: default the org to the
GITHUB_REPOSITORYowner segment (${GITHUB_REPOSITORY%%/*}), falling back to the sane literalvigOSonly when no usable owner/repo is present (empty orOWNER/REPO).RED→GREEN: new bats test runs
--no-promptswithGITHUB_REPOSITORY=some-org/repoand noORG_NAME/manifest org, then asserts.vig-ospersistsDEVKIT_ORG=some-org(notvigOS/devc) and the LICENSE org substitution is slash-free. PersistedvigOS/devcbefore the fix; green after. The existing #885 write-back test's assertion was updated fromDEVKIT_ORG=vigOS/devctoDEVKIT_ORG=testto reflect the corrected owner-derived default.Verification
tests/bats/init-workspace.bats): 123 passed, 0 failed (existing fix(workspace): upgrade preview report is blank on the Nix image (find misses store symlinks) #949/fix(workspace): upgrade file report over-reports ADDED (find walk misses rsync's .venv exclude) #951 and all prior tests still green).prek run --all-files: green (sync-manifest mirrored the changelog intoassets/workspace/.devcontainer/CHANGELOG.md, folded into the fix commit).Closes #953
Closes #954