Skip to content

fix(agents): count Codex project TOML assets - #220

Open
1jackwang wants to merge 1 commit into
QoderAI:mainfrom
1jackwang:fix/codex-asset-inventory-219
Open

1jackwang wants to merge 1 commit into
QoderAI:mainfrom
1jackwang:fix/codex-asset-inventory-219

Conversation

@1jackwang

Copy link
Copy Markdown

Summary

Codex project-scope asset inventory now counts project-local .codex/agents/*.toml custom agents and .codex/config.toml [mcp_servers.<name>] declarations. Collection stays static, bounded, read-only, and metadata-only.

Why

Traceability and Scope

  • Spec/ADR: docs/specs/2026-11-28-219-codex-asset-inventory.md
  • Acceptance criteria addressed: AC-1 through AC-6
  • Canonical owners changed:
    • scripts/agent-customize/providers/codex.mjs
    • scripts/agent-customize/providers/codex-toml.mjs
    • scripts/agent-lint/index.mjs
  • Explicit non-goals: no MCP execution, URL probing, runtime availability claims, config mutation, new host adapter, full TOML ecosystem, changelog/version/release changes.

Change Type

  • Bug fix
  • Feature
  • Tests only
  • Documentation/community
  • Refactor with no intended behavior change
  • Dependency, packaging, or infrastructure

Test and Review Evidence

Check Result
npx --yes node@24 node_modules/vitest/vitest.mjs run test/agents/agent-asset-baseline.test.mjs test/agents/agent-lint.test.mjs test/agents/coding-agent-practices-inventory.test.mjs test/skills-docs/doc-link-graph.test.mjs --reporter=dot 4 files, 68 tests passed
npm run harness:generated Passed; no generated diff
npm run harness:test 27 files, 218 tests passed
npm run pack:verify Passed: npm 750 entries, runtime zip 1011 entries
node --check on changed modules Passed
Root npm test -- --reporter=dot during implementation 1795 passed / 1 failed / 8 skipped in isolated HOME; remaining Pi os.homedir() mismatch is environment-sensitive and unrelated

Manual or visual evidence: synthetic Git workspaces cover one/multiple declarations, duplicate MCP identity, malformed TOML, non-object MCP declarations, Windows paths with spaces/Unicode, secret canaries, and a sentinel-writing MCP command that was never executed.

Risk and Recovery

  • Compatibility and cross-platform impact: Windows behavior is tested locally; macOS/Linux CI remains authoritative.
  • Package, plugin, schema, or generated-file impact: shipped static collector added; no schema or generated-language changes.
  • Rollback or recovery path: revert the single fix commit; no persisted config or user data is modified.
  • Residual risk or unverified boundary: hand-written bounded TOML collector intentionally ignores files over 256 KB and malformed files; it is not a general TOML parser.

AI Involvement

  • Level: Assisted
  • Human review and validation: no human review is claimed yet; the main agent reviewed the diff and independently reran focused tests, Harness tests, syntax checks, and package verification. Maintainer review is requested.

Checklist

  • I followed AGENTS.md, CONTRIBUTING.md, and the relevant canonical-owner guidance.
  • The change is focused and does not include unrelated local or generated state.
  • Tests and documentation match the behavior actually delivered.
  • Markdown links were checked when documentation moved or changed.
  • Cross-platform behavior was considered for Windows, macOS, and Linux.
  • Package/runtime verification was run when shipped files or dependencies changed.
  • User-facing or compatibility changes are recorded in CHANGELOG.md — intentionally not changed per AGENTS.md scope rules and issue non-goals.
  • I have the right to contribute this work under the repository's MIT License.

Collect project Codex TOML custom agents and MCP declarations in the
canonical provider so lint and public inventory share accurate counts.
Keep collection static and metadata-only, and add synthetic Git workspace
regressions for counts, duplicates, malformed declarations, and Windows paths.

Story: QoderAI#219
Spec: docs/specs/2026-11-28-219-codex-asset-inventory.md
Test: Focused checks 68/68 and Harness checks 218/218 under Node v24.22.3
Risk: Windows-local validation; macOS/Linux CI remains authoritative

Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant