[codex] expose repository discovery metadata#51
Conversation
|
Claude finished @moose-lab's task in 1m 16s —— View job PR Review
Findings
Summary: This is a clean documentation/metadata PR. The guard-test pattern is well-chosen for ensuring discovery files stay in place. No correctness bugs, no security issues, no unsafe casts worth blocking on. The two should-fix items are about test fragility, not runtime behavior. Verdict: APPROVE (with the wiki.json assertion cleanup recommended before the file is ever committed to this repo) |
|
Claude finished @moose-lab's task in 1m 32s —— View job PR Review
What changed since last review Commit - assert.match(llms, /https:\/\/github\.com\/moose-lab\/DevLog/);
- assert.match(llms, /https:\/\/deepwiki\.com\/moose-lab\/DevLog/);
+ assert.ok(llms.includes("https://github.com/moose-lab/DevLog"));
+ assert.ok(llms.includes("https://deepwiki.com/moose-lab/DevLog"));This correctly addresses both CodeQL "Missing regular expression anchor" alerts. Unanchored regexes on URL strings can match unexpected substrings; Findings
CodeQL alerts resolved: Both "Missing regular expression anchor" alerts are closed by Summary: This is a clean metadata/discovery PR — AGENTS.md, llms.txt, docs/repository-discovery.md, package.json enrichment, and a guard test to keep them in place. The CodeQL fix is correct and appropriate. The two should-fix items from the prior review are carry-overs; neither affects runtime behavior or current test correctness. The wiki.json assertions are the only ones worth addressing before that file is ever committed. Verdict: APPROVE |
|
Claude finished @moose-lab's task in 1m 5s —— View job PR Review — commit
|
|
Claude finished @moose-lab's task in 1m 40s —— View job PR Review — commit
|
| Prior finding | Status |
|---|---|
[should-fix] wiki.json hardcoded title assertions |
✅ replaced with Array.isArray(wiki.repo_notes) / Array.isArray(wiki.pages) |
[nit] process.cwd() CWD-dependent path resolution |
✅ now fileURLToPath(new URL("../../..", import.meta.url)) |
[nit] "Superpowers v5.1.0" version rotting |
✅ version string removed |
[nit] /optional/i too-loose readme assertion |
✅ tightened to require .devin/wiki.json in proximity to "optional" |
Path resolution check: new URL("../../..", import.meta.url) from src/core/__tests__/repository-discovery.test.ts — URL resolution strips the filename first, then applies three .. segments removing __tests__, core, and src. Resolves correctly to repo root. ✓
Findings
No new issues.
Verdict: APPROVE
eb56dcc to
c904531
Compare
|
Claude finished @moose-lab's task in 2m 16s —— View job PR Review — squashed commit
|
| Prior finding | Status |
|---|---|
[should-fix] wiki.json hardcoded title assertions |
✅ structural Array.isArray() checks only |
[nit] process.cwd() CWD-dependent resolution |
✅ fileURLToPath(new URL("../../..", import.meta.url)) |
[nit] "Superpowers v5.1.0" version pin |
✅ AGENTS.md not in scope of this PR |
[nit] /optional/i too-loose |
✅ tightened to require .devin/wiki.json in proximity |
| CodeQL alerts #28 / #29 | ✅ readBulletValue() + assert.equal() — no substring/regex URL matching |
Path resolution check: new URL("../../..", import.meta.url) from src/core/__tests__/repository-discovery.test.ts resolves src/core/__tests__/ → src/core/ → src/ → repo root. ✓
readBulletValue correctness: parses - Label: value lines, returns the value substring, used with assert.equal() for exact match — CodeQL "Incomplete URL substring sanitization" does not apply. ✓
Wiki.json guard: early-returns when .devin/wiki.json is absent; uses only structural Array.isArray() assertions if present — no hardcoded title strings. ✓
Verdict: APPROVE
Summary
llms.txtas the crawler/LLM-facing project map for DevLog.Audit Result
AGENTS.md,README.md, anddocs/repository-discovery.mdare no longer in the PR diff or commit history..devin/wiki.jsonpage-title assertions; when that optional file exists, the test now validates structure only.import.meta.urlinstead ofprocess.cwd()so focused tests also work from subdirectories..devin/wiki.json, not any unrelated occurrence of “optional”.Validation
node --test --import tsx --test-reporter spec src/core/__tests__/repository-discovery.test.ts(3/3 pass)bun run typecheckTZ=Asia/Shanghai bun run test(274/274 pass)git diff --cached --check && bun run typecheck && TZ=Asia/Shanghai bun run testsuccessfully.