Repository navigation
fix: visible project detection, schema coverage, exec bit on API downloads - #441
Merged
Merged
Conversation
Two handlers checked for a project's own config by statting .skillshare/config.yaml directly, so a project created with init -p --visible (directory skillshare/) was reported as not having one, and the MCP page missed its override conflict. Both now ask projectdir.Find, which the CLI already uses. Refs #437
Both schemas reject unknown keys, but plugins, cnb_hosts and gitea_hosts were missing from both, the global schema also lacked extras_source and log, and skillEntry had no kind, so editors flagged valid configs. A test now compares the yaml tags of Config and ProjectConfig with the schema properties. Refs #438
The GitHub, Gitea and CNB content API fallbacks wrote every file as 0644, so a skill's scripts lost their exec bit whenever sparse checkout was not available. The APIs do not report the git mode, so a file that starts with #! is now written as 0755; anything the kernel could run directly carries one. The mode is set on both branches, because O_TRUNC keeps the mode of a file that already existed. Refs #439
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…File The raw write ratchet listed the os calls of downloadFile, giteaDownloadFile and cnbWriteBlob. Those now go through writeDownloadedFile, so the list names that function instead, with the same clone reason.
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.
Type
proposals/only — see CONTRIBUTING.md)Linked Issue
Closes #437
Closes #438
Closes #439
Three small defects found while researching #239, one commit each.
Changes
#437 — dashboard misses
--visibleprojects.handler_projects.goandhandler_mcp.gostatted<root>/.skillshare/config.yamldirectly; both now useprojectdir.Find, as the CLI does. Test:TestListProjects_DetectsVisibleProjectConfig.#438 — schemas reject keys the structs accept. Added
plugins,cnb_hosts,gitea_hoststo both schemas,extras_sourceandlogto the global schema, andkindtoskillEntry. The global schema had the same drift as the project one, so both are fixed here. Test:TestSchema_PropertiesCoverConfigStructsdiffs theyamltags ofConfig/ProjectConfigagainst the schemaproperties.#439 — content API fallback drops the exec bit. GitHub, Gitea and CNB downloads now go through one
writeDownloadedFile: a file starting with#!is written0755, anything else0644(set explicitly, sinceO_TRUNCkeeps a pre-existing mode). The APIs do not return the git mode; a file the kernel can execute directly always carries a shebang. Test:TestWriteDownloadedFile_ShebangIsExecutable, including a re-download that must drop the bit.Checks run (devcontainer)
gofmt -l internal/install internal/config internal/server— cleango vet ./internal/install/ ./internal/config/ ./internal/server/— cleango test ./internal/config/ -count=1— okNot run:
make checkas a whole. In the worktree used for this branch,TestResolveWebRef,TestRemoteRefs_*andTestGitHooksAPIContractfail because the worktree's.gitfile points at a host path the container cannot resolve; the same tests pass against the main checkout at the same commit, so they are unrelated to this diff.Checklist
make check) — for code changes — tests included and passing per package; fullmake checknot run, see above