Skip to content
LinkedInX

Harness Testing and Validation - Drift Detection and CI Validation

About 5 minutes

Target audience: Developers who want to detect Codex harness drift locally and in CI
Prerequisites: Understanding of AGENTS.md, config.toml, Rules, Skills, and Hooks

Harness drift occurs when intended configuration and the state Codex actually loads diverge. Broken links, stale adapters, locale differences, and excessive permissions need dedicated checks.

LayerExample
SyntaxTOML, JSON, and frontmatter parse correctly
ReferencesAGENTS.md, Skills, and internal links resolve
PolicyBuild approval, secret protection, and i18n rules hold
BehaviorCodex discovers the intended Skill or Hook

Keep checks small enough to report a specific failure.

npm run harness:sync
npm run harness:check
node scripts/ensure-slugs.js
node scripts/verify-links.js

Synchronize adapters after changing shared/, then validate harness policy, slugs, and content links.

Normal syntax and link checks should run in CI without secrets. For Codex-driven review or repeatable tasks, openai/codex-action@v1 can run codex exec with a prompt file, sandbox, and output file.

Specify the prompt, GitHub token permissions, sandbox, secret source, write boundary, and Codex CLI version. Start with contents: read and add only necessary permissions.

A harness change is complete when required synchronization, syntax, references, local behavior, and CI checks pass, with any unrun checks stated explicitly.

Finally, Plugin Marketplace publishing covers distribution of reusable harness assets.

See the references for the external specifications and background sources used on this page.[1][2]

  1. OpenAI, Codex documentation
  2. OpenAI, OpenAI API documentation
Quiz