Skip to content

fix: visible project detection, schema coverage, exec bit on API downloads - #441

Merged
runkids merged 5 commits into
mainfrom
runkids/fix-visible-project-schema-execbit
Oct 6, 2026
Merged

runkids merged 5 commits into
mainfrom
runkids/fix-visible-project-schema-execbit

Conversation

@runkids

@runkids runkids commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Type

  • Bug fix
  • Small improvement (docs, typo, minor refactor)
  • Feature proposal (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 --visible projects. handler_projects.go and handler_mcp.go statted <root>/.skillshare/config.yaml directly; both now use projectdir.Find, as the CLI does. Test: TestListProjects_DetectsVisibleProjectConfig.

#438 — schemas reject keys the structs accept. Added plugins, cnb_hosts, gitea_hosts to both schemas, extras_source and log to the global schema, and kind to skillEntry. The global schema had the same drift as the project one, so both are fixed here. Test: TestSchema_PropertiesCoverConfigStructs diffs the yaml tags of Config / ProjectConfig against the schema properties.

#439 — content API fallback drops the exec bit. GitHub, Gitea and CNB downloads now go through one writeDownloadedFile: a file starting with #! is written 0755, anything else 0644 (set explicitly, since O_TRUNC keeps 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 — clean
  • go vet ./internal/install/ ./internal/config/ ./internal/server/ — clean
  • go test ./internal/config/ -count=1 — ok
  • New tests plus the existing GitHub download tests — pass

Not run: make check as a whole. In the worktree used for this branch, TestResolveWebRef, TestRemoteRefs_* and TestGitHooksAPIContract fail because the worktree's .git file 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

  • I've read CONTRIBUTING.md
  • Tests included and passing (make check) — for code changes — tests included and passing per package; full make check not run, see above
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR — three bug fixes, each in its own commit and issue

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
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T14:40:40.268025Z 7a501ce PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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.
@runkids
runkids merged commit 9775ba5 into main Oct 6, 2026
8 checks passed
@runkids
runkids deleted the runkids/fix-visible-project-schema-execbit branch October 6, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant