Skip to content

feat: add pilot evidence and operator surfaces - #14

Merged
SetraTheXX merged 32 commits into
mainfrom
publish/phase12-phase13-pilot
Jul 25, 2026
Merged

feat: add pilot evidence and operator surfaces#14
SetraTheXX merged 32 commits into
mainfrom
publish/phase12-phase13-pilot

Conversation

@SetraTheXX

Copy link
Copy Markdown
Owner

Summary

  • complete the Phase 12 beta surface
  • add Phase 13 pilot design and delivery plans
  • record structured pilot status and gate evidence
  • require verified receipts and redacted pilot exports

Validation

  • npm test
  • npm run smoke
  • npm run check
  • npm run pack:dry-run
  • npm pack --dry-run

This is part 4 of the ordered Phase 11-14 publication series.

Copilot AI review requested due to automatic review settings July 25, 2026 23:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@SetraTheXX
SetraTheXX merged commit 051f0d5 into main Jul 25, 2026
6 checks passed
@SetraTheXX
SetraTheXX deleted the publish/phase12-phase13-pilot branch July 25, 2026 23:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 522a6ba35e

ℹ️ 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".

Comment thread src/evidence/verify.js
Comment on lines +76 to +78
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.");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Verify the complete persisted receipt

If any receipt field outside integrity is edited—for example, the completeness claim, task results, or reviewer decision—run verify still passes because the rebuilt receipt is compared only through its integrity member, and the receipt itself is excluded from that inventory. Compare the complete rebuilt receipt (using the persisted generatedAt) so verification cannot accept altered evidence claims.

AGENTS.md reference: AGENTS.md:L5-L5

Useful? React with 👍 / 👎.

Comment thread src/pilot/status.js
Comment on lines +61 to +64
const qualifyingEvidence = definition.source === "participants"
? [...externalParticipantIds].sort()
: [...new Set(evidenceByType.get(definition.observationType) || [])].sort();
const observed = qualifyingEvidence.length;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Count distinct repeat participants

When one independent participant records three repeat-user observations with different observation IDs, this generic evidence count reaches the threshold of three even though there is only one repeat user. Derive this gate from distinct record.participant.id values that have qualifying repeat-use evidence rather than counting observations.

AGENTS.md reference: AGENTS.md:L5-L5

Useful? React with 👍 / 👎.

Comment thread src/pilot/status.js
Comment on lines +61 to +64
const qualifyingEvidence = definition.source === "participants"
? [...externalParticipantIds].sort()
: [...new Set(evidenceByType.get(definition.observationType) || [])].sort();
const observed = qualifyingEvidence.length;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Require all five onboarding ranks

Five onboarding-remediation observations can all use rank: 1 with distinct codes and this count marks top-onboarding-failures-remediated as met. Since the validator only bounds each rank to 1–5, status must deduplicate by rank and require the complete rank set instead of treating any five observations as the top five failures.

AGENTS.md reference: AGENTS.md:L5-L5

Useful? React with 👍 / 👎.

Comment thread src/pilot/record.js
Comment on lines +44 to +45
const recordPath = path.join(repoRoot, ".cewp", "pilots", pilotId, "record.json");
if (fs.existsSync(recordPath)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject symlinks in canonical pilot paths

If .cewp/pilots/<pilot-id> is pre-created as a symlink to a directory outside the repository, this path construction and the later atomic write follow it, allowing pilot create to create record.json outside the repository; pilot record can similarly rewrite a valid external record. Apply the same component-by-component symlink and realpath containment checks used for export before reading or writing canonical pilot records.

Useful? React with 👍 / 👎.

Comment thread src/pilot/status.js
Comment on lines +35 to +37
const record = JSON.parse(fs.readFileSync(filePath, "utf8"));
if (record.schemaVersion !== PILOT_RECORD_SCHEMA_VERSION) {
throw new Error(`Unsupported pilot record schema for ${entry.name}: ${record.schemaVersion || "missing"}.`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve status when one pilot record is malformed

When any record.json is truncated, invalid JSON, or uses an unsupported schema, this unguarded parse/throw aborts the entire pilot status command, hiding every valid record and gate result. Load records independently and report failures through the existing records.invalid, exclusions, and warnings fields so one damaged pilot cannot make the authoritative status unavailable.

AGENTS.md reference: AGENTS.md:L5-L5

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants