Bind installed D-AI Skill to canonical runtime - #39
Conversation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec75b183c8
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| $package = Get-Content -LiteralPath $packagePath -Raw | ConvertFrom-Json | ||
| if ([string]::IsNullOrWhiteSpace([string]$package.scripts.'d-ai')) { | ||
| throw 'package.json does not define the d-ai npm script' | ||
| } | ||
| if (-not (Test-Path -LiteralPath (Join-Path $Candidate 'src\entry\codex-cli.ts') -PathType Leaf)) { | ||
| throw 'canonical D-AI Codex entry is missing' |
There was a problem hiding this comment.
Verify the bound repository identity before executing it
When .runtime-root points to an obsolete worktree or unrelated directory containing a package.json with any nonempty d-ai script plus src/entry/codex-cli.ts, this check accepts it and line 117 executes that package script. A binding can therefore silently route durable commands through the wrong implementation—or execute an arbitrary npm command—despite being presented as a validated canonical D-AI-Hub checkout; verify the Git repository/remote identity and intended canonical revision rather than only these filenames.
AGENTS.md reference: AGENTS.md:L15-L19
Useful? React with 👍 / 👎.
| $temporaryPath = "$bindingPath.$([guid]::NewGuid().ToString('N')).tmp" | ||
| try { | ||
| [System.IO.File]::WriteAllText($temporaryPath, "$resolvedRuntimeRoot`r`n", [System.Text.UTF8Encoding]::new($false)) | ||
| Move-Item -LiteralPath $temporaryPath -Destination $bindingPath -Force |
There was a problem hiding this comment.
Ignore the repository-local runtime binding
When the documented repository-local entry at skills/custom/d-ai/scripts/invoke.ps1 is configured by passing its own Skill root, this write creates skills/custom/d-ai/.runtime-root, but no ignore rule covers that machine-local file. Normal activation therefore leaves the canonical checkout dirty, which makes the documented sync path refuse to pull and contaminates subsequent release diffs; add a narrowly scoped ignore rule for the binding.
AGENTS.md reference: AGENTS.md:L28-L31
Useful? React with 👍 / 👎.
Summary
Verification
Final real home-installed Quote Float acceptance remains a post-merge gate. This PR does not add Quote Float aliases or status grammar and does not touch command-runner, product code, durable schema, or CI.