Skip to content
LinkedInX

Harness Testing and Validation - Drift Detection and CI Validation

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.

Four validation layers

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
This table scrolls horizontally. Keyboard users can focus the table and use the left and right arrow keys.

Keep checks small enough to report a specific failure.

Repository checks

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.

Add Checks to CI

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.

Completion Criteria

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]

References

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

For the latest releases and updates, check the official website and official documentation.

Quiz