feat: add CI operational checkpoint v0.1 - #228
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds the CI Operational Checkpoint v0.1 contract, a schema and example checkpoint, a reference evaluator with wrapper checks, conformance tests for resume and lineage behavior, documentation updates, and a GitHub Actions workflow to run the suite. ChangesCI Operational Checkpoint v0.1
Estimated code review effort: 4 (Complex) | ~70 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review @codex review Review exact head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== PR info ==="
gh pr view 228 --repo safal207/pythiaLabs --json headRefOid,title,files,additions,deletions,changedFiles
echo "=== Verify head SHA ==="
git rev-parse HEAD
echo "=== Find related files ==="
fd -i "ci_operational_checkpoint" .
fd -i "continuity" .Length of output: 1902 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== SCHEMA ==="
cat -n standards/agent-continuity/schema/ci-operational-checkpoint-v0.1.schema.json
echo "=== EXAMPLE ==="
cat -n standards/agent-continuity/examples/ci-operational-checkpoint-v0.1.example.jsonLength of output: 14698 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== digest length check ==="
python3 - <<'EOF'
import json
with open('standards/agent-continuity/examples/ci-operational-checkpoint-v0.1.example.json') as f:
d = json.load(f)
v = d['checkpoint_digest']['value']
print(len(v), v)
EOF
echo "=== EVALUATOR ==="
cat -n standards/agent-continuity/conformance/ci_operational_checkpoint_reference.py
echo "=== TESTS ==="
cat -n standards/agent-continuity/conformance/test_ci_operational_checkpoint.pyLength of output: 21569 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== Verify example digest self-consistency ==="
python3 - <<'EOF'
import json, hashlib, copy
d = json.load(open('standards/agent-continuity/examples/ci-operational-checkpoint-v0.1.example.json'))
expected = d['checkpoint_digest']['value']
v = copy.deepcopy(d)
v.pop('checkpoint_digest', None)
b = json.dumps(v, ensure_ascii=False, sort_keys=True, separators=(",", ":"), allow_nan=False).encode('utf-8')
computed = hashlib.sha256(b).hexdigest()
print("expected:", expected)
print("computed:", computed)
print("match:", expected == computed)
EOF
echo "=== CI-CHECKPOINT-CODES.md ==="
cat -n standards/agent-continuity/CI-CHECKPOINT-CODES.md
echo "=== CI-OPERATIONAL-CHECKPOINT-V0.1.md ==="
cat -n standards/agent-continuity/CI-OPERATIONAL-CHECKPOINT-V0.1.md
echo "=== workflow ==="
cat -n .github/workflows/agent-continuity-conformance.yml
echo "=== README diff context ==="
cat -n standards/agent-continuity/README.mdLength of output: 13105 🏁 Script executed: #!/bin/bash
set -euo pipefail
fd -i "requirements.txt" standards/agent-continuity
cat standards/agent-continuity/conformance/requirements.txt 2>/dev/null || echo "MISSING requirements.txt"Length of output: 417 🏁 Script executed: #!/bin/bash
set -euo pipefail
gh pr checks 228 --repo safal207/pythiaLabs || trueLength of output: 865
Continuity/authority boundary — Fresh Action Envelope requirement for merge/deploy — Lineage preservation — verified the full chain: root-vs-non-root parent consistency ( Workspace drift classification — repository/working-directory mismatch correctly maps to Verification evidence requirements — required/completed/pending IDs must exactly partition; duplicate IDs across the two lists are rejected; empty Digest integrity — I independently recomputed the SHA-256 over the canonicalized (sorted-keys, digest field excluded) example JSON and it matches the stored Two minor, non-blocking observations for a possible follow-up:
Overall the checkpoint/evaluator pair is well-specified, self-consistent, and the 17 conformance tests genuinely exercise the boundary conditions described in the PR objectives. No blocking issues found. ✅ Action performedReview finished.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 166498adc3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (3)
standards/agent-continuity/schema/ci-operational-checkpoint-v0.1.schema.json (1)
3-3: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
$idpoints to a non-dereferenceable GitHub blob URL.
https://github.com/safal207/pythiaLabs/standards/agent-continuity/schema/...is agithub.comweb page URL, not a raw/resolvable JSON resource. Standard practice for a JSON Schema$idis a URI that actually resolves to the schema content (e.g.raw.githubusercontent.comor a published docs domain), so schema tooling that dereferences$id/$refwon't fetch valid JSON from this location.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@standards/agent-continuity/schema/ci-operational-checkpoint-v0.1.schema.json` at line 3, The schema $id in ci-operational-checkpoint-v0.1.schema.json points to a GitHub web page URL instead of a dereferenceable JSON resource. Update the $id value to a resolvable raw schema URI or published docs URI so tooling can fetch the schema content, and keep the identifier consistent with the schema’s canonical location.standards/agent-continuity/CI-OPERATIONAL-CHECKPOINT-V0.1.md (1)
14-22: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueFlow diagram omits
IDEMPOTENT_REPLAY.Section 6 documents
IDEMPOTENT_REPLAYas a distinct outcome for a consumed checkpoint ID, and it's one of the required outcomes from issue#218, but the outcome diagram here only listsCONTINUE | REVALIDATE | RESTART | REJECT. Consider adding replay to keep the diagram authoritative.📝 Proposed doc tweak
checkpoint context -> validate schema and digest + -> check for replay -> validate lineage -> preserve rejected approaches -> preserve required verification -> compare current workspace - -> CONTINUE | REVALIDATE | RESTART | REJECT + -> CONTINUE | REVALIDATE | RESTART | REPLAY | REJECT🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@standards/agent-continuity/CI-OPERATIONAL-CHECKPOINT-V0.1.md` around lines 14 - 22, Update the checkpoint flow diagram so it includes IDEMPOTENT_REPLAY as a distinct outcome alongside CONTINUE, REVALIDATE, RESTART, and REJECT. Use the existing checkpoint decision flow in the document’s “checkpoint context” block and make it consistent with the outcome set described later in the spec, so the diagram matches the documented behavior..github/workflows/agent-continuity-conformance.yml (1)
1-41: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueSolid CI setup: SHA-pinned actions, path-filtered triggers, least-privilege permissions.
Optionally consider adding a
concurrencygroup andtimeout-minutesto avoid redundant overlapping runs and guard against a hung job, though the test suite is short-lived so risk is low.♻️ Optional hardening
jobs: conformance: runs-on: ubuntu-latest + timeout-minutes: 10 + concurrency: + group: agent-continuity-conformance-${{ github.ref }} + cancel-in-progress: true steps:🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/agent-continuity-conformance.yml around lines 1 - 41, The workflow in Agent Continuity conformance is already solid, but it should be hardened by adding a concurrency group and a job timeout to the conformance job. Update the workflow definition around the conformance job so overlapping runs cancel or queue cleanly, and set a reasonable timeout for the steps that run actions/setup-python and the unittest discover command.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@standards/agent-continuity/conformance/ci_operational_checkpoint_reference.py`:
- Around line 258-262: The checkpoint comparison in the workspace validation
logic treats dirty_state_digest as required, which can raise KeyError for valid
checkpoints that omit it. Update the changed_fields check in the checkpoint
reference helper to read dirty_state_digest safely (for example, via a defaulted
lookup or conditional presence check) while keeping base_ref and head_sha
comparisons unchanged, so omitted dirty state still produces a deterministic
resume result.
In `@standards/agent-continuity/conformance/test_ci_operational_checkpoint.py`:
- Around line 47-49: The helper `assert_outcome` is eagerly evaluating
`current_workspace(checkpoint)` even when `current_workspace` is already
provided in `kwargs`, causing failures before `evaluate_resume` runs. Update
`assert_outcome` to fetch `current_workspace` lazily only when the key is
absent, and keep the fallback logic inside the method so malformed-checkpoint
tests can reach `evaluate_resume` as intended.
In
`@standards/agent-continuity/schema/ci-operational-checkpoint-v0.1.schema.json`:
- Around line 309-335: The completedVerification schema currently allows an
empty evidence_refs array, which does not match the required invariant for
completed items. Update the completedVerification definition in
ci-operational-checkpoint-v0.1.schema.json by adding a minItems constraint to
evidence_refs so the schema itself enforces at least one durable evidence
reference, alongside the existing verification_id, target, and uniqueItems
rules.
---
Nitpick comments:
In @.github/workflows/agent-continuity-conformance.yml:
- Around line 1-41: The workflow in Agent Continuity conformance is already
solid, but it should be hardened by adding a concurrency group and a job timeout
to the conformance job. Update the workflow definition around the conformance
job so overlapping runs cancel or queue cleanly, and set a reasonable timeout
for the steps that run actions/setup-python and the unittest discover command.
In `@standards/agent-continuity/CI-OPERATIONAL-CHECKPOINT-V0.1.md`:
- Around line 14-22: Update the checkpoint flow diagram so it includes
IDEMPOTENT_REPLAY as a distinct outcome alongside CONTINUE, REVALIDATE, RESTART,
and REJECT. Use the existing checkpoint decision flow in the document’s
“checkpoint context” block and make it consistent with the outcome set described
later in the spec, so the diagram matches the documented behavior.
In
`@standards/agent-continuity/schema/ci-operational-checkpoint-v0.1.schema.json`:
- Line 3: The schema $id in ci-operational-checkpoint-v0.1.schema.json points to
a GitHub web page URL instead of a dereferenceable JSON resource. Update the $id
value to a resolvable raw schema URI or published docs URI so tooling can fetch
the schema content, and keep the identifier consistent with the schema’s
canonical location.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: b41a39b2-2baa-40bd-a0f5-3651b12230db
📒 Files selected for processing (8)
.github/workflows/agent-continuity-conformance.ymlstandards/agent-continuity/CI-CHECKPOINT-CODES.mdstandards/agent-continuity/CI-OPERATIONAL-CHECKPOINT-V0.1.mdstandards/agent-continuity/README.mdstandards/agent-continuity/conformance/ci_operational_checkpoint_reference.pystandards/agent-continuity/conformance/test_ci_operational_checkpoint.pystandards/agent-continuity/examples/ci-operational-checkpoint-v0.1.example.jsonstandards/agent-continuity/schema/ci-operational-checkpoint-v0.1.schema.json
safal207
left a comment
There was a problem hiding this comment.
@codex address all current unresolved feedback with one coherent patch. Requirements:
- Preserve rejected-approach lineage by requiring each prior row (ID, description, reason, status) to remain unchanged; add
REJECTED_APPROACH_CHANGEDand a regression. - Preserve completed verification proof lineage: same target and all prior evidence refs must remain; appending new refs is allowed. Add
COMPLETED_VERIFICATION_CHANGEDplus tests for changed target, removed/replaced evidence, and appended evidence. - Reject memory-only evidence case-insensitively (
MEMORY://,Agent-Memory://, etc.). - Keep
dirty_state_digestoptional in the checkpoint schema, matching issue #218. When the checkpoint declares it (including null), require the current workspace mapping to explicitly contain the field; missing observation returnsREVALIDATE_WORKSPACE / CURRENT_WORKSPACE_FIELD_MISSING. If the checkpoint omits it, omit it from comparison. Add both tests. - Require explicit current repository/working_directory/base_ref/head_sha fields and deterministic outcomes; do not use
dict.get()to conflate missing with null. - Add
minItems: 1to completed verificationevidence_refsin the schema. - Make the test helper's
current_workspacedefault lazy. - Update the stable code registry and CI operational checkpoint documentation consistently.
- Run the complete Agent Continuity suite, VCE suite, Security, and repository CI. Keep the PR Draft and do not merge. Report the new exact head and test count.
|
On it |
|
On it |
safal207
left a comment
There was a problem hiding this comment.
@codex address all unresolved review feedback on this exact head. Apply the coherent lineage, verification-evidence, dirty-state, schema, case-insensitive memory, lazy-test-helper, docs, and reason-code fixes already specified. Keep Draft and do not merge.
|
On it |
|
On it |
Summary
Testing
|
PR Summary by QodoAdd CI Operational Checkpoint v0.1 spec, evaluator, conformance tests, and CI workflow
AI Description
Diagram
High-Level Assessment
Files changed (15)
|
safal207
left a comment
There was a problem hiding this comment.
@codex review
@coderabbitai review
Final exact-head review. All workflows are green and all known threads are resolved.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Code Review by Qodo
Context used 1. dirty_state_digest not required
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@standards/agent-continuity/conformance/ci_operational_checkpoint_reference_core.py`:
- Around line 10-20: Make the hook installation reload-idempotent in
ci_operational_checkpoint_reference_core by ensuring
_ORIGINAL_PREVIOUS_CHECKPOINT_INTEGRITY_ERROR always points to the canonical
_impl._previous_checkpoint_integrity_error, not a previously installed wrapper.
Update the module-level setup around _previous_checkpoint_integrity_error so it
caches the original implementation on _impl the first time, then reuses that
cached reference on subsequent imports before the wrapper calls it, preventing
recursion after reloads.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: d9464a97-28cd-417a-adf9-cdf67b034011
📒 Files selected for processing (3)
standards/agent-continuity/conformance/ci_operational_checkpoint_reference.pystandards/agent-continuity/conformance/ci_operational_checkpoint_reference_core.pystandards/agent-continuity/conformance/test_ci_checkpoint_core_integrity.py
|
@codex address the valid current feedback: use |
|
You have reached your Codex usage limits. You can see your limits in the Codex usage dashboard. |
|
Qodo follow-up for |
Thanks for the follow-up — that sounds consistent.
So, in practice, |
safal207
left a comment
There was a problem hiding this comment.
@codex review
@coderabbitai review
Final exact-head review for b0461bfeaba805905ad862d904afdd4e12b4a4d6. All four workflows are green, the reload regression and whitespace-memory regression pass, and all review threads are resolved.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@coderabbitai resume @codex review Final exact-head review for |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== PR head / draft state ==="
gh pr view 228 --repo safal207/pythiaLabs --json headRefOid,isDraft,title
echo
echo "=== PR checks ==="
gh pr checks 228 --repo safal207/pythiaLabs || true
echo
echo "=== Files changed since last reviewed head ==="
gh api repos/safal207/pythiaLabs/compare/28b78e5e890bd601f4f7b3751e52b9d47384cf87...b0461bfeaba805905ad862d904afdd4e12b4a4d6 \
--jq '.files[] | {filename, status, additions, deletions, changes}'Length of output: 2259 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== outlines ==="
for f in \
standards/agent-continuity/conformance/ci_operational_checkpoint_reference.py \
standards/agent-continuity/conformance/ci_operational_checkpoint_reference_core.py \
standards/agent-continuity/conformance/test_ci_checkpoint_core_integrity.py \
standards/agent-continuity/conformance/test_ci_checkpoint_reload_idempotency.py \
standards/agent-continuity/conformance/test_ci_memory_ref_normalization.py
do
echo "--- $f ---"
ast-grep outline "$f" --view expanded || true
done
echo
echo "=== memory-ref normalization usage ==="
rg -n -C3 'lstrip\(\)|casefold\(\)|MEMORY_ONLY_PREFIXES|memory://|agent-memory://|summary://' \
standards/agent-continuity/conformance/ci_operational_checkpoint_reference.py \
standards/agent-continuity/conformance/ci_operational_checkpoint_reference_core.py \
standards/agent-continuity/conformance/test_ci_checkpoint_core_integrity.py \
standards/agent-continuity/conformance/test_ci_checkpoint_reload_idempotency.py \
standards/agent-continuity/conformance/test_ci_memory_ref_normalization.py
echo
echo "=== targeted file reads ==="
for f in \
standards/agent-continuity/conformance/ci_operational_checkpoint_reference.py \
standards/agent-continuity/conformance/ci_operational_checkpoint_reference_core.py \
standards/agent-continuity/conformance/test_ci_checkpoint_core_integrity.py \
standards/agent-continuity/conformance/test_ci_checkpoint_reload_idempotency.py \
standards/agent-continuity/conformance/test_ci_memory_ref_normalization.py
do
echo "--- $f ---"
cat -n "$f"
done
echo
echo "=== total conformance test count ==="
grep -rn "def test_" standards/agent-continuity/conformance/test_*.py | wc -lLength of output: 24486
Confirmed:
I also verified that this delta does not reintroduce any requirement for Clean current-head signal: no new material findings on this frozen head. ✅ Action performedReviews resumed. Review finished.
|
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
Adds a bounded, machine-readable CI operational checkpoint for safely resuming agentic delivery work across restart, compaction, review waits, and agent handoff.
Core boundary
The checkpoint is fixed to
authority: context_only. Merge or deploy intent must declarerequires_fresh_authority=trueand still requires a fresh Action Envelope plus current exact-target evidence.Included
pythia.ci_operational_checkpoint.v0.1;Review hardening
AUTHORITY_NOT_CONTEXT_ONLYeven with other schema failures;Deterministic outcomes
Relationship to existing protocols
Verification
Security, VCE conformance, Agent Continuity conformance, and full repository CI are green on exact head
28b78e5e890bd601f4f7b3751e52b9d47384cf87. Fresh exact-head Codex and CodeRabbit review evidence is required before merge.Closes #218
Refs #216
Summary by CodeRabbit