feat: prepare stable CEWP core contracts - #15
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 04f15705f1
ℹ️ 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".
| const rebuilt = buildEvidenceReceipt(found, { generatedAt: receipt.generatedAt }); | ||
| if (JSON.stringify(rebuilt.integrity) !== JSON.stringify(receipt.integrity)) { | ||
| issue(issues, "receipt-integrity-inventory-mismatch", "Receipt integrity inventory does not match current canonical evidence."); | ||
| } |
There was a problem hiding this comment.
Rebuild the full persisted receipt before passing integrity
When evidence-receipt.json alone is edited, this check compares only rebuilt.integrity, so forged fields such as goal, completeness, tasks, usage, or reviewer results still receive a passing receipt-integrity verdict as long as the embedded file inventory is unchanged. Compare the rebuilt receipt's complete canonical content, excluding only explicitly volatile fields, so Core verification cannot certify altered evidence.
AGENTS.md reference: AGENTS.md:L5-L5
Useful? React with 👍 / 👎.
| for (const record of externalRecords) { | ||
| for (const observation of record.observations || []) { | ||
| if (!observation || observation.qualification?.eligible !== true || typeof observation.type !== "string") continue; | ||
| if (!evidenceByType.has(observation.type)) evidenceByType.set(observation.type, []); |
There was a problem hiding this comment.
Revalidate pilot evidence before counting it
When linked workflow evidence is deleted or tampered with after an observation is recorded—or when a local record is edited—status continues counting the stored qualification.eligible flag without rerunning inspectReviewedRunEvidence or validating the observation. Consequently stale or fabricated full-reviewed-run entries can satisfy the Phase 13 gate even though Core verification, finalization, or reviewer PASS no longer holds; recompute linked qualifications and reject malformed stored observations before counting.
AGENTS.md reference: AGENTS.md:L5-L5
Useful? React with 👍 / 👎.
| function confirmCodexEffortEvidence(evidence, usage) { | ||
| const confirmed = usage && usage.label === "observed"; | ||
| const effective = (selected) => ( | ||
| confirmed && selected && selected.status === "explicit" | ||
| ? { status: "known", value: selected.value, source: "codex-exec-turn-completed-usage" } |
There was a problem hiding this comment.
Keep effective model and effort unknown without identity evidence
When an explicit model or effort is requested and any valid turn.completed usage event appears, this promotes both effective values to known. However, parseManagedUsage only extracts token counts and observes no model or reasoning-effort identity, so host overrides, alias resolution, or an ignored effort setting are reported as confirmed facts and can corrupt model/effort experiment results; retain these as requested selections until the adapter returns explicit effective-configuration evidence.
Useful? React with 👍 / 👎.
Summary
Validation
This is part 5 of the ordered Phase 11-14 publication series.