Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/plananvil-codex-qualification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
options:
- smoke
- c13
- c08
- diagnostics
- precision
- recovery
Expand Down Expand Up @@ -248,7 +249,7 @@ jobs:
if: >-
github.event_name == 'workflow_dispatch' &&
github.ref == 'refs/heads/main' &&
(inputs.mode == 'full' || inputs.mode == 'c13' || inputs.mode == 'recovery')
(inputs.mode == 'full' || inputs.mode == 'c13' || inputs.mode == 'recovery' || inputs.mode == 'c08')
environment: plananvil-codex
runs-on:
- self-hosted
Expand Down Expand Up @@ -326,7 +327,10 @@ jobs:
qualification_args+=(--only C13)
fi
set +e
if [ "${{ inputs.mode }}" = "recovery" ]; then
if [ "${{ inputs.mode }}" = "c08" ]; then
qualification_args+=(--only C08)
fi
if [ "${{ inputs.mode }}" = "recovery" ] || [ "${{ inputs.mode }}" = "c08" ]; then
python3 tools/live_codex_qualification_recovery.py \
--root "${QUALIFICATION_REPO}" \
--source-commit "${GITHUB_SHA}" \
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/plananvil-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ jobs:
run: git diff --check

distribution:
needs: codex-conformance
if: always()
name: distribution and release candidate
runs-on: ubuntu-latest
timeout-minutes: 15
Expand All @@ -70,6 +72,11 @@ jobs:
git config --global user.email "plananvil-ci@example.invalid"
git config --global commit.gpgsign false
git config --global protocol.file.allow always
- name: Require actual CLI conformance in the protected distribution check
if: always()
env:
CONFORMANCE_RESULT: ${{ needs.codex-conformance.result }}
run: test "$CONFORMANCE_RESULT" = "success"
- name: Run distribution and release tests
run: python -m unittest discover -s tests -v
- name: Validate prepared C01-C16 evidence templates
Expand Down Expand Up @@ -117,7 +124,9 @@ jobs:
echo "$RUNNER_TEMP/codex-conformance-bin" >> "$GITHUB_PATH"
echo "PLANANVIL_TEST_CODEX_BIN=$RUNNER_TEMP/codex-conformance-bin/codex" >> "$GITHUB_ENV"
- name: Verify real CLI lifecycle against deterministic loopback responses
run: python -m unittest discover -s tests -p test_qualification_c09_cli.py -v
run: |
python -m unittest discover -s tests -p test_qualification_c09_cli.py -v
python -m unittest discover -s tests -p test_qualification_c08_cli.py -v
- name: Restore hosted VM namespace policy
if: always()
run: |
Expand Down
15 changes: 12 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ All notable changes to PlanAnvil are documented here.
- extend deterministic live qualification for C02, C09, C11, C13, C14, and C16 with explicit-only skill policy, current AGENTS precedence evidence, project-scoped SubagentStart semantics, bytecode-free PlanAnvil bootstrap, and real Git signing/hook failure diagnostics;
- make C12 a deterministic runtime byte-budget probe with redundant `project_doc_max_bytes` enforcement, secret head/tail markers, zero-tool automatic-loading evidence, and outer PlanAnvil full-file hash verification;
- make C06, C08, and C09 deterministic live probes using the real PlanAnvil PreToolUse/PreCompact/PostCompact hooks, explicit postcondition evidence, low-limit `body_after_prefix` auto-compaction triggers, checkpoint repair, repeated compaction, and post-second-compaction continuation checks;
- add a diagnostic-only C13 transport mode that keeps `full` strict-ephemeral, retries non-ephemeral only for the recognized parent-thread registration failure, uses an isolated disposable `CODEX_HOME`, requires cleanup/auth-metadata invariants, and verifies real SubagentStart semantics with an outer-generated context proof before any baseline 2.3 decision;
- promote C13 qualification to baseline 2.3: full qualification remains ephemeral-first but may use a known-error-gated non-ephemeral retry with a synthetic home-scoped `fixture_agent` in disposable `CODEX_HOME`, while the real `SubagentStart` hook remains project-scoped and cleanup/auth invariants remain fail-closed;
- retain diagnostic-only historical C13 controllers; the active full controller uses the baseline 2.3 ephemeral-first, known-error-gated fallback described below;
- promote C13 qualification to baseline 2.3: full qualification remains ephemeral-first but may use a known-error-gated non-ephemeral retry with a project-scoped, explicitly declared `fixture_agent` and project-scoped `SubagentStart` hook; disposable `CODEX_HOME` isolates only trust/auth bridging and persistence and cleanup/auth invariants remain fail-closed;
- require production releases to use a GitHub-verified signed annotated tag whose target is reachable from `main`;
- fail the production release gate closed when the release worktree is dirty or Git cleanliness cannot be verified;
- document the controlled self-hosted Codex qualification path and keep the previous sandbox procedure as a manual fallback.
Expand Down Expand Up @@ -55,9 +55,18 @@ All notable changes to PlanAnvil are documented here.
- make the Git-hook probe fixture emit explicit hook diagnostics while preserving fail-closed classification for unrelated commit failures;
- synchronize golden blind-review fixtures and dependent comparison hashes with the required independent `plan-anvil-reviewer` author role.

### Qualification closure — 2026-09-07

- preserve complete baseline 2.3 live evidence from full run #25, `34060321283`, tested at `d0384f76bc4150d33bb8f51ef5981f3243b3cfb3` with Codex CLI 0.153.4, `gpt-5.6-sol`, Debian 13; all C01–C16 were reproduced;
- retain the exact source-bound archive, hashes and original limitations; C13 passed via the permitted project-native non-ephemeral fallback;
- replace the old C08 repaired-path workload with a finite pressure/finish scenario and strict termination checks; the old positive timeout remains in historical evidence and the replacement still requires live confirmation;
- add C08-only qualification and real-CLI loopback conformance without changing C09/C10/C13 runtime behavior, product payload or live runner security;
- reset newly materialized template indices to unexecuted package results instead of inheriting historical success labels;
- validate qualification archive integrity and qualified product identity, and require committed finite C08 completion evidence before production publication.

### Release status

0.2.0 is code-complete as a release candidate. Production publication remains blocked until protected-`main` administration is enabled and required C01-C16 live Codex evidence is committed as `REPRODUCED`.
0.2.0 remains a release candidate. Full baseline qualification is recorded; production publication awaits the finite C08 live follow-up, strict release validation and a verified signed annotated tag. No tag or release has been published by the qualification-closure change.

## [0.1.0] - 2026-07-12

Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ It **generates and validates a plan but never executes it**. Product implementat

The deterministic generator core, schemas, templates, tests, optional planning agents, defense-in-depth hooks, repository installer/upgrader/uninstaller, release tooling, and a deterministic C01-C16 live-qualification template archive/materializer are implemented.

Release status is **candidate**, not production-ready. Deterministic CI is green, but production publication remains gated on two external steps:
**Full baseline 2.3 qualification passed:** run [#25](https://github.com/KeyffMS/PlanAnvil/actions/runs/34060321283) reproduced C01–C16 on source commit `d0384f76bc4150d33bb8f51ef5981f3243b3cfb3`, with Codex CLI `0.153.4`, model `gpt-5.6-sol`, and Debian 13. C04 is informational; the other fifteen capabilities gate qualification. The complete sanitized evidence is committed under `capabilities/` and preserved unchanged under `qualifications/34060321283/`.

1. protect `main` with required PR/CI checks (tracked by issue #6);
2. execute the prepared C01-C16 packages in an authenticated current Codex sandbox and commit required `REPRODUCED` evidence (tracked by issue #7).
**Release status remains candidate.** The old C08 positive trial proved its narrow unblock assertion but later timed out. Its finite replacement must finish in a new live `mode=c08` run and its evidence must be committed before production publication. C13 was reproduced through the explicit known-error-gated non-ephemeral fallback, not by proving ephemeral spawning works.

The capability contract is defined in `docs/CODEX_CAPABILITY_BASELINE.md`. Deterministic tests and prepared fixtures do not substitute for live Codex evidence.
See [current qualification and release status](https://github.com/KeyffMS/PlanAnvil/blob/main/docs/QUALIFICATION_STATUS.md) for the precise evidence boundary and next step. Deterministic CI and loopback CLI conformance are regression checks, not substitutes for live model evidence. Production publication also retains protected-main, clean-tree and verified signed annotated-tag requirements.

The capability contract is defined in `docs/CODEX_CAPABILITY_BASELINE.md`.

## Install into another repository

Expand Down Expand Up @@ -108,7 +109,7 @@ python tools/release_check.py --candidate
## Release and live qualification

- `docs/RELEASE.md` — deterministic gates, tag workflow and publication contract
- `docs/CODEX_SANDBOX_RUNBOOK.md` — exact remaining C01-C16 sandbox sequence
- `docs/CODEX_SANDBOX_RUNBOOK.md` — current full and targeted sandbox procedures
- `capabilities/templates.part*` + `tools/prepare_capabilities.py` — deterministic prepared C01-C16 fixtures/prompts/config/assertions/results/hashes

A production tag is rejected by `.github/workflows/release.yml` until every required capability is `REPRODUCED`.
Expand All @@ -121,11 +122,11 @@ A production tag is rejected by `.github/workflows/release.yml` until every requ
- `docs/RECOVERY_AND_VALIDATION.md` — crash recovery, checkpoint, schema and path-safety guarantees
- `docs/OPENAI_COMPLIANCE.md` — Codex compatibility decisions
- `docs/CODEX_CAPABILITY_BASELINE.md` — reproducible capability release gate
- `docs/CODEX_CAPABILITY_QUALIFICATION_2026-08-28.md` — latest qualification audit
- `docs/QUALIFICATION_STATUS.md` — current qualification status and historical audit index
- `docs/INSTALLATION.md` — install/upgrade/uninstall contract
- `docs/TROUBLESHOOTING.md` — operational recovery guidance
- `docs/RELEASE.md` — release workflow
- `docs/CODEX_SANDBOX_RUNBOOK.md` — remaining live qualification procedure
- `docs/CODEX_SANDBOX_RUNBOOK.md` — live qualification procedure

## Author

Expand Down
33 changes: 26 additions & 7 deletions capabilities/C01/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
# C01 — Capability evidence
# C01 — Repository skill discovery

- Expected behavior: Repository skills are discovered from `.agents/skills`.
- Source: `DOCUMENTED`
- Release-gating: `yes`
- Current result: `BLOCKED`
- Qualification attempt: `2026-08-28`
- Documentation check: `PASS` against current official Codex skills documentation.
- Live blocker: no authenticated Codex runtime or `codex` executable is available in the qualification environment.
- Current result: `REPRODUCED`
- Qualification package state: `READY_FOR_LIVE_RUN`
- Prepared: `2026-08-28`

Do not change the result to `REPRODUCED` until this directory contains the complete sanitized package defined in `capabilities/README.md`.
## Objective

Verify a repository skill under .agents/skills is discovered from the repository and can be explicitly selected.

## Live metadata to record

Before changing this result to `REPRODUCED`, record the exact Codex version, model slug, OS, permission mode, project trust, fixture commit, setup/cleanup, sanitized observations, evaluation, and hashes. Do not commit transcripts, credentials, private paths, or unrelated repository data.

## Execution

Use `fixture/`, `config/README.md`, `prompt.txt`, and `run-command.txt`. Replace the current BLOCKED `actual.sanitized.json`/`evaluation.json` with the live result, update `capabilities/index.json`, then run `python tools/rehash_capability.py C01` and `python tools/validate_capabilities.py`.

## Live qualification

- Date: `2026-09-06`
- Codex: `codex-cli 0.153.4`
- Model: `gpt-5.6-sol`
- OS: `Debian GNU/Linux 13 (trixie)`
- Permission mode: `approval=never; sandbox=per-trial; model-tool network disabled`
- Project trust: `trusted via CLI override for disposable fixture repositories`
- Source commit: `d0384f76bc4150d33bb8f51ef5981f3243b3cfb3`
- Result: `REPRODUCED`
162 changes: 162 additions & 0 deletions capabilities/C01/actual.sanitized.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
{
"capability_id": "C01",
"environment": {
"codex_version": "codex-cli 0.153.4",
"fixture_commit": "4df35777e3afd6f5b6a9aecfe22793e65bba83ea",
"model": "gpt-5.6-sol",
"os": "Debian GNU/Linux 13 (trixie)",
"permission_mode": "approval=never; sandbox=per-trial; model-tool network disabled",
"project_trust": "trusted via CLI override for disposable fixture repositories",
"source_commit": "d0384f76bc4150d33bb8f51ef5981f3243b3cfb3"
},
"observations": [
"The explicit activation trial resolved the repository fixture skill and produced the activation proof `FIXTURE_SKILL_ACTIVE`.",
"The nested-working-directory trial verified repository identity, discovered the same fixture skill, and produced `FIXTURE_SKILL_ACTIVE`.",
"Both trials completed with PASS outcomes, no blocker, and no recorded error events."
],
"result": "REPRODUCED",
"schema_version": "1.0",
"trials": [
{
"assertions": [
{
"evidence": "Explicit invocation resolved `fixture-capability` from `.agents/skills/fixture-capability/SKILL.md`; activation proof: FIXTURE_SKILL_ACTIVE.",
"name": "Repository skill resolution and explicit activation",
"status": "PASS"
}
],
"blocker": null,
"capability_id": "C01",
"event_summary": {
"completed_command_items": 1,
"completed_file_change_items": 0,
"error_events": 0,
"event_types": {
"item.completed": 5,
"item.started": 1,
"thread.started": 1,
"turn.completed": 1,
"turn.started": 1
},
"item_types": {
"agent_message": 2,
"command_execution": 2,
"error": 2
}
},
"git_after": {
"branch": "master",
"cached_paths": [],
"commit_count": 2,
"head": "4df35777e3afd6f5b6a9aecfe22793e65bba83ea",
"index_tree": "715ef280db9d5ab81405996e12aa2be15877d964",
"refs": [
"refs/heads/master"
],
"status": [],
"worktree_count": 1
},
"git_before": {
"branch": "master",
"cached_paths": [],
"commit_count": 2,
"head": "4df35777e3afd6f5b6a9aecfe22793e65bba83ea",
"index_tree": "715ef280db9d5ab81405996e12aa2be15877d964",
"refs": [
"refs/heads/master"
],
"status": [],
"worktree_count": 1
},
"observations": [
"FIXTURE_SKILL_ACTIVE"
],
"outcome": "PASS",
"sandbox": "read-only",
"trial": "explicit_repository_skill_activation",
"trial_name": "explicit_repository_skill_activation"
},
{
"assertions": [
{
"evidence": "Explicit invocation produced activation proof FIXTURE_SKILL_ACTIVE.",
"name": "The fixture skill appears in repository skill discovery.",
"status": "PASS"
},
{
"evidence": "Repository identity was verified from the nested working directory, and the repository skill was then discovered and activated.",
"name": "Discovery works when Codex starts from a nested working directory inside the same repository.",
"status": "PASS"
}
],
"blocker": null,
"capability_id": "C01",
"event_summary": {
"completed_command_items": 3,
"completed_file_change_items": 0,
"error_events": 0,
"event_types": {
"item.completed": 8,
"item.started": 3,
"thread.started": 1,
"turn.completed": 1,
"turn.started": 1
},
"item_types": {
"agent_message": 3,
"command_execution": 6,
"error": 2
}
},
"git_after": {
"branch": "master",
"cached_paths": [],
"commit_count": 2,
"head": "4df35777e3afd6f5b6a9aecfe22793e65bba83ea",
"index_tree": "715ef280db9d5ab81405996e12aa2be15877d964",
"refs": [
"refs/heads/master"
],
"status": [],
"worktree_count": 1
},
"git_before": {
"branch": "master",
"cached_paths": [],
"commit_count": 2,
"head": "4df35777e3afd6f5b6a9aecfe22793e65bba83ea",
"index_tree": "715ef280db9d5ab81405996e12aa2be15877d964",
"refs": [
"refs/heads/master"
],
"status": [],
"worktree_count": 1
},
"observations": [
"FIXTURE_SKILL_ACTIVE"
],
"outcome": "PASS",
"sandbox": "read-only",
"trial": "nested_working_directory_discovery",
"trial_name": "nested_working_directory_discovery"
},
{
"evaluator_event_summary": {
"completed_command_items": 1,
"completed_file_change_items": 0,
"error_events": 0,
"event_types": {
"item.completed": 3,
"item.started": 1,
"thread.started": 1,
"turn.completed": 1,
"turn.started": 1
},
"item_types": {
"agent_message": 2,
"command_execution": 2
}
}
}
]
}
11 changes: 11 additions & 0 deletions capabilities/C01/config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# C01 sandbox configuration

Use a disposable project-scoped Codex configuration. Record the exact effective configuration in the sanitized result. Do not copy user/global secrets or unrelated settings.

PlanAnvil baseline settings when applicable:

```toml
[agents]
enabled = true
max_concurrent_threads_per_session = 4
```
7 changes: 7 additions & 0 deletions capabilities/C01/evaluation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"capability_id": "C01",
"expected_met": true,
"result": "REPRODUCED",
"schema_version": "1.0",
"summary": "Sanitized trial evidence demonstrates repository skill discovery both explicitly and from a nested working directory."
}
9 changes: 9 additions & 0 deletions capabilities/C01/expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"assertions": [
"The fixture skill appears in repository skill discovery.",
"Discovery works when Codex starts from a nested working directory inside the same repository."
],
"capability_id": "C01",
"schema_version": "1.0",
"title": "Repository skill discovery"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
name: fixture-capability
description: Return exactly FIXTURE_SKILL_ACTIVE when explicitly invoked.
---

Return exactly `FIXTURE_SKILL_ACTIVE`.
5 changes: 5 additions & 0 deletions capabilities/C01/fixture/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# C01 fixture

Create a disposable Git repository from the contents of this directory. Install the PlanAnvil release into it when the capability exercises PlanAnvil itself. Commit the fixture before starting Codex so before/after Git identity can be compared.

Objective: Verify a repository skill under .agents/skills is discovered from the repository and can be explicitly selected.
15 changes: 15 additions & 0 deletions capabilities/C01/hashes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"algorithm": "sha256",
"files": {
"README.md": "422e8b7912cf13e186c621d5eeae747575e5389e5b135b157596ee4201819565",
"actual.sanitized.json": "9042d7e35a10682bff746c4313193baf4d1947dfd814853ca03f78555825aba9",
"config/README.md": "2b6beca33571ad108adcdbac9becc82a7fe658cf672305f01f58f4ea54565b4e",
"evaluation.json": "12aeecb91deeaef38f633d67f60451a07ba176539a5430cfc16c82c8bafa7ee5",
"expected.json": "c41329fbf6892a65b85cfe1166e86d2a3b59b684a9a81601974fca0c54a0cee7",
"fixture/.agents/skills/fixture-capability/SKILL.md": "0c4c7985ed4a06a2fa45d0d6a1887fec0f5a59892ae1d0d88317ac1c82a7a4ff",
"fixture/README.md": "a3ac65c07ebf67442b31cf3bc1d28ac5c849bd08fee9cba93b0a31339e7602d8",
"prompt.txt": "14542f39efe7d9d60d6993f2da2ce19ff021fb50d499d9a60a2f7d7ea6f2030a",
"run-command.txt": "0683eb1cb9ff624f8923fce722ffdd05ea4c592509cf2d25c0879b43e8fb56af"
},
"schema_version": "1.0"
}
Loading