Skip to content

Feat/learner ux v6.1 - #2

Merged
ALikesToCode merged 143 commits into
mainfrom
feat/learner-ux-v6.1
Jul 21, 2026
Merged

ALikesToCode merged 143 commits into
mainfrom
feat/learner-ux-v6.1

Conversation

@ALikesToCode

Copy link
Copy Markdown
Owner

No description provided.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 235 files, which is 135 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d4f8951d-3700-463a-b19a-e12bafad790d

📥 Commits

Reviewing files that changed from the base of the PR and between 134c22f and 6608ad2.

📒 Files selected for processing (235)
  • .gitignore
  • Dockerfile.runner
  • README.md
  • apps/web/e2e/browser-authority.ts
  • apps/web/e2e/cloak-test.ts
  • apps/web/e2e/judged-flow.spec.ts
  • apps/web/e2e/mobile-public-replay.spec.ts
  • apps/web/e2e/performance-evidence.ts
  • apps/web/e2e/private-session.ts
  • apps/web/e2e/qualification-reporter.ts
  • apps/web/e2e/recovery-and-intake.spec.ts
  • apps/web/playwright.config.ts
  • apps/web/src/App.test.tsx
  • apps/web/src/App.tsx
  • apps/web/src/api.test.ts
  • apps/web/src/api.ts
  • apps/web/src/app/CounterLabStudio.test.tsx
  • apps/web/src/app/CounterLabStudio.tsx
  • apps/web/src/components/generative-ui/BoundaryMapBlock.module.css
  • apps/web/src/components/generative-ui/BoundaryMapBlock.test.tsx
  • apps/web/src/components/generative-ui/BoundaryMapBlock.tsx
  • apps/web/src/components/generative-ui/TrustedLabSceneRenderer.test.tsx
  • apps/web/src/components/learner/AccessibilityStyles.test.ts
  • apps/web/src/components/learner/CompileAuthorityPhase.module.css
  • apps/web/src/components/learner/CompileAuthorityPhase.test.tsx
  • apps/web/src/components/learner/CompileAuthorityPhase.tsx
  • apps/web/src/components/learner/ExperimentTheater.module.css
  • apps/web/src/components/learner/ExperimentTheater.test.tsx
  • apps/web/src/components/learner/ExperimentTheater.tsx
  • apps/web/src/components/learner/LearnerThesisStrip.module.css
  • apps/web/src/components/learner/LearnerThesisStrip.test.tsx
  • apps/web/src/components/learner/LearnerThesisStrip.tsx
  • apps/web/src/components/learner/LearningDirectorPanel.test.tsx
  • apps/web/src/components/learner/LearningDirectorPanel.tsx
  • apps/web/src/components/learner/LiveAuthorityStrip.module.css
  • apps/web/src/components/learner/LiveAuthorityStrip.test.tsx
  • apps/web/src/components/learner/LiveAuthorityStrip.tsx
  • apps/web/src/components/learner/LockedBeliefBreakPreview.module.css
  • apps/web/src/components/learner/LockedBeliefBreakPreview.test.tsx
  • apps/web/src/components/learner/LockedBeliefBreakPreview.tsx
  • apps/web/src/components/learner/ModelDuel.module.css
  • apps/web/src/components/learner/ModelDuel.test.tsx
  • apps/web/src/components/learner/ModelDuel.tsx
  • apps/web/src/components/learner/QuestionComposer.module.css
  • apps/web/src/components/learner/QuestionComposer.test.tsx
  • apps/web/src/components/learner/QuestionComposer.tsx
  • apps/web/src/components/learner/ReflectionBuilder.test.tsx
  • apps/web/src/components/learner/ReflectionBuilder.tsx
  • apps/web/src/components/learner/RouteRecovery.test.tsx
  • apps/web/src/components/learner/RouteRecovery.tsx
  • apps/web/src/components/learner/StartOverDialog.module.css
  • apps/web/src/components/learner/StartOverDialog.test.tsx
  • apps/web/src/components/learner/StartOverDialog.tsx
  • apps/web/src/components/learner/VerifiedBeliefBreakTheater.module.css
  • apps/web/src/components/learner/VerifiedBeliefBreakTheater.test.tsx
  • apps/web/src/components/learner/VerifiedBeliefBreakTheater.tsx
  • apps/web/src/components/lesson/ImbalancePatchReview.test.tsx
  • apps/web/src/components/lesson/ImbalancePatchReview.tsx
  • apps/web/src/components/lesson/ImbalanceTransferLesson.test.tsx
  • apps/web/src/components/lesson/ImbalanceTransferLesson.tsx
  • apps/web/src/components/proof/ReasoningDiffView.module.css
  • apps/web/src/components/proof/ReasoningDiffView.test.tsx
  • apps/web/src/components/proof/ReasoningDiffView.tsx
  • apps/web/src/components/replay/LegacyReplayResult.module.css
  • apps/web/src/components/replay/LegacyReplayResult.test.tsx
  • apps/web/src/components/replay/LegacyReplayResult.tsx
  • apps/web/src/components/replay/ProofCapsuleReplayView.test.tsx
  • apps/web/src/components/replay/ProofCapsuleReplayView.tsx
  • apps/web/src/components/studio/ProjectSidebar.test.tsx
  • apps/web/src/components/studio/ProjectSidebar.tsx
  • apps/web/src/components/studio/ProofConsole.test.tsx
  • apps/web/src/components/studio/ProofConsole.tsx
  • apps/web/src/features/boundary/BoundaryHunt.test.tsx
  • apps/web/src/features/boundary/BoundaryHunt.tsx
  • apps/web/src/features/boundary/SampleBoundaryExperience.test.tsx
  • apps/web/src/features/boundary/SampleBoundaryExperience.tsx
  • apps/web/src/features/boundary/SampleBoundaryPanel.test.tsx
  • apps/web/src/features/boundary/SampleBoundaryPanel.tsx
  • apps/web/src/features/judge/JudgeModeView.module.css
  • apps/web/src/features/judge/JudgeModeView.test.tsx
  • apps/web/src/features/judge/JudgeModeView.tsx
  • apps/web/src/features/judge/SampleEvidencePack.tsx
  • apps/web/src/styles.css
  • apps/web/src/styles/studio.css
  • apps/web/src/test-fixtures/proofBundle.ts
  • apps/web/src/test/browserAuthority.test.ts
  • apps/web/src/test/performanceEvidence.test.ts
  • apps/web/src/test/qualificationReporter.test.ts
  • apps/web/worker/api.test.ts
  • apps/web/worker/api.ts
  • apps/web/worker/d1-runner-job-repository.test.ts
  • apps/web/worker/d1-runner-job-repository.ts
  • apps/web/worker/deployment-config.test.ts
  • apps/web/worker/runner-container-env.test.ts
  • apps/web/worker/runner-container-env.ts
  • apps/web/worker/runner-control-plane.test.ts
  • apps/web/worker/runner-control-plane.ts
  • docs/ARCHITECTURE.md
  • docs/AUTHORITY_BOUNDARIES.md
  • docs/CODEX_USAGE.md
  • docs/DECISIONS.md
  • docs/DEMO_CAPTIONS.vtt
  • docs/DEMO_SCRIPT.md
  • docs/DEVPOST_COPY.md
  • docs/EVALUATION.md
  • docs/PROGRESS.md
  • docs/RELEASE_CHECKLIST.md
  • docs/SCREENSHOT_PLAN.md
  • docs/SUBMISSION_PACKAGE.json
  • docs/THREAT_MODEL.md
  • docs/audits/counterlab-first-prize/12_SUBMISSION_READINESS.md
  • docs/audits/counterlab-first-prize/19_RELEASE_DEPENDENCY_AND_REVIEW_GRAPH.md
  • package.json
  • packages/belief-analyst/src/index.test.ts
  • packages/belief-analyst/src/index.ts
  • packages/belief-analyst/src/learning-director.test.ts
  • packages/belief-analyst/src/learning-director.ts
  • packages/codex-client/src/app-server.ts
  • packages/codex-client/src/index.test.ts
  • packages/concept-registry/src/index.ts
  • packages/contracts/src/index.ts
  • packages/plan-verifier/src/scientific-candidate-v5.test.ts
  • packages/scientific-engine-registry/src/schema.ts
  • packages/scientific-engine-registry/src/types.ts
  • packages/scientific-engine-registry/test/generation-isolation-schema.test.ts
  • packages/scientific-engine-registry/test/release-check-receipt.test.ts
  • packages/scientific-engine-registry/test/release-schema.test.ts
  • packages/session-core/src/domain.ts
  • packages/session-core/src/index.test.ts
  • packages/session-core/src/runner-jobs.test.ts
  • packages/session-core/src/runner-jobs.ts
  • packages/session-core/src/service.ts
  • scientific-engines/schemas/deployment-receipt-v5.schema.json
  • scientific-engines/schemas/deployment-receipt-v6.schema.json
  • scientific-engines/schemas/deployment-receipt-v7.schema.json
  • scientific-engines/schemas/generation-isolation-evidence-v1.schema.json
  • scientific-engines/schemas/qualified-runner-release-v5.schema.json
  • scientific-engines/schemas/qualified-runner-release-v6.schema.json
  • scientific-engines/schemas/release-check-receipt-v3.schema.json
  • scientific-engines/schemas/release-check-receipt-v4.schema.json
  • scientific-engines/schemas/release-check-receipt-v5.schema.json
  • scripts/build-source-bound-runner.sh
  • scripts/contained-cgroup-control-helper.d.mts
  • scripts/contained-cgroup-control-helper.mjs
  • scripts/contained-cgroup-control-helper.test.ts
  • scripts/contained-cgroup-evidence.d.mts
  • scripts/contained-cgroup-evidence.mjs
  • scripts/contained-cgroup-evidence.test.ts
  • scripts/contained-cgroup-observer-bindings.d.mts
  • scripts/contained-cgroup-observer-bindings.mjs
  • scripts/contained-cgroup-observer-bindings.test.ts
  • scripts/contained-cgroup-observer-protocol.d.mts
  • scripts/contained-cgroup-observer-protocol.mjs
  • scripts/contained-cgroup-observer-protocol.test.ts
  • scripts/contained-cgroup-observer.d.mts
  • scripts/contained-cgroup-observer.mjs
  • scripts/contained-cgroup-observer.test.ts
  • scripts/contained-cgroup-qualification-coordinator.d.mts
  • scripts/contained-cgroup-qualification-coordinator.mjs
  • scripts/contained-cgroup-qualification-coordinator.test.ts
  • scripts/contained-containerd-config.d.mts
  • scripts/contained-containerd-config.mjs
  • scripts/contained-qualified-receipt-store.d.mts
  • scripts/contained-qualified-receipt-store.mjs
  • scripts/contained-qualified-receipt-store.test.ts
  • scripts/contained-qualified-rootless-receipt.d.mts
  • scripts/contained-qualified-rootless-receipt.mjs
  • scripts/contained-qualified-rootless-receipt.test.ts
  • scripts/contained-rootless-spec.mjs
  • scripts/contained-runtime-attestation.mjs
  • scripts/contained-runtime-client.mjs
  • scripts/contained-runtime-linearizer.d.mts
  • scripts/contained-runtime-linearizer.mjs
  • scripts/contained-runtime-linearizer.test.ts
  • scripts/contained-runtime-request.d.mts
  • scripts/contained-runtime-request.mjs
  • scripts/contained-runtime-request.test.ts
  • scripts/contained-runtime-run.d.mts
  • scripts/contained-runtime-run.mjs
  • scripts/contained-runtime-server.mjs
  • scripts/contained-runtime-server.test.ts
  • scripts/contained-runtime-stop-compat.test.ts
  • scripts/contained-runtime-supervisor.mjs
  • scripts/contained-runtime-supervisor.test.ts
  • scripts/contained-runtime.test.ts
  • scripts/create-deployment-receipt.test.ts
  • scripts/create-deployment-receipt.ts
  • scripts/deploy-qualified.sh
  • scripts/finalize-cloakbrowser-qualification.test.ts
  • scripts/finalize-cloakbrowser-qualification.ts
  • scripts/generate-contract-schemas.ts
  • scripts/generation-isolation-evidence.test.ts
  • scripts/generation-isolation-evidence.ts
  • scripts/normalize_runner_oci.py
  • scripts/prepare-qualified-deploy.test.ts
  • scripts/prepare-qualified-deploy.ts
  • scripts/production-smoke.sh
  • scripts/production_smoke_report.py
  • scripts/qualify-runner-release.ts
  • scripts/refresh-source-bound-scientific-evidence.sh
  • scripts/release-check-receipt.ts
  • scripts/release-check.sh
  • scripts/repository-cli-paths.test.ts
  • scripts/repository-cli-paths.ts
  • scripts/runtime-bin/mount.fuse3
  • scripts/runtime-toolchain-lock.json
  • scripts/setup-contained-runtime.sh
  • scripts/source-bound-evidence.test.ts
  • scripts/start-contained-runtime.sh
  • scripts/stop-contained-runtime-v3-compat.d.mts
  • scripts/stop-contained-runtime-v3-compat.mjs
  • scripts/stop-contained-runtime.mjs
  • scripts/submission-publication-evidence.ts
  • scripts/test_normalize_runner_oci.py
  • scripts/test_production_smoke.py
  • scripts/timeout-cleanup-receipt.test.ts
  • scripts/timeout-cleanup-receipt.ts
  • scripts/validate-contained-runtime-command.mjs
  • scripts/validate-submission-package.test.ts
  • scripts/validate-submission-package.ts
  • scripts/verify-contained-runtime.mjs
  • scripts/verify-scientific-engines.sh
  • scripts/write-contained-runtime-attestation.mjs
  • services/hosted-runner/src/launch-boundary.test.ts
  • services/hosted-runner/src/launch-boundary.ts
  • services/hosted-runner/src/server.test.ts
  • services/hosted-runner/src/server.ts
  • services/hosted-runner/src/startup-probe.test.ts
  • services/hosted-runner/src/startup-probe.ts
  • services/runner/Dockerfile
  • services/runner/src/counterlab_runner/docker.py
  • services/runner/src/counterlab_runner/timeout_proof.py
  • services/runner/tests/test_docker_runner.py
  • services/runner/tests/test_reproduction_tooling.py
  • services/runner/tests/test_timeout_proof.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Review on demand using usage pricing
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/learner-ux-v6.1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@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: 3c50ebf1af

ℹ️ 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 on lines +178 to +180
"--symlink",
"usr/lib",
"/lib64",

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 Point /lib64 at the merged-/usr loader directory

In the Debian Trixie amd64 runner image, dynamically linked executables such as /usr/bin/bash use /lib64/ld-linux-x86-64.so.2, while the merged-/usr compatibility target is usr/lib64, not usr/lib. This sandbox therefore cannot launch the Bash-based isolation probe (and may fail any other dynamically linked command using that interpreter), causing the mandatory startup probe to fail and preventing every hosted runner instance from becoming ready.

Useful? React with 👍 / 👎.

Comment on lines +1497 to 1498
await connection.close();
await launch.dispose?.();

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 Guarantee launch disposal when shutdown times out

If initialization fails before revokeCredentials() and the child does not emit close within the new five-second shutdown bound, connection.close() rejects and JavaScript skips the following launch.dispose(). For the hosted boundary this leaves the staged auth file containing the credential on disk, so disposal must run in a nested finally even when process termination fails.

AGENTS.md reference: AGENTS.md:L472-L474

Useful? React with 👍 / 👎.

Comment on lines +586 to +594
await containedNewOutputFile(
this.options.repositoryRoot,
outputFile,
"CloakBrowser raw run evidence",
);
await writeFile(outputFile, `${JSON.stringify(report, null, 2)}\n`, {
encoding: "utf8",
flag: "wx",
mode: 0o600,

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 Allow repeated Playwright runs to write fresh reports

With the default configuration, every run targets the fixed apps/web/test-results/runtime/m8-local/evidence/cloakbrowser-raw-run.json, which is outside Playwright's cleared outputDir. After the first ordinary E2E run leaves that file behind, containedNewOutputFile() rejects it on the next run and the catch returns { status: "failed" }, so an otherwise passing suite deterministically fails on every rerun unless someone manually deletes evidence or chooses a new runtime root.

Useful? React with 👍 / 👎.

Comment on lines +557 to +563
await rename(stagingRoot, expectedRoot);
const publishedReservation = await containedNewOutputFile(
input.repositoryRoot,
resolve(expectedRoot, ".publication-reservation.json"),
"published CloakBrowser qualification reservation",
);
await rename(reservation, publishedReservation);

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 Include the publication reservation in the atomic rename

If the process crashes or the second rename fails after stagingRoot has been moved to expectedRoot, the published directory exists without .publication-reservation.json. Every retry then fails the initial assertPathAbsent(expectedRoot) check, leaving that deployment receipt permanently wedged with incomplete qualification evidence; move the reservation into the staging tree before the single publication rename or provide an explicit recovery path.

Useful? React with 👍 / 👎.

Comment on lines +3 to +6
const authorities = [
{
name: "GPT-5.6",
responsibility: "Proposes a bounded belief frame",

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 Derive the displayed analyst identity from live configuration

When OPENAI_MODEL overrides the default or OPENAI_BASE_URL selects a compatible provider, the new landing strip still tells every learner that "GPT-5.6" proposes the belief frame. Since the Worker accepts and forwards those configurations, this creates a false public authority claim; use a provider-neutral role label or expose only a verified server-side model identity instead of hardcoding the default.

AGENTS.md reference: AGENTS.md:L426-L430

Useful? React with 👍 / 👎.

@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: c491afe772

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

if (!Number.isFinite(timestamp)) return true;
return (
now.getTime() >=
Math.min(timestamp + MUTATION_CLAIM_TTL_MS, jobDeadline(job))

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 Keep output writes fenced until the job deadline

When reading or storing a runner output takes more than 60 seconds, this marks the still-active claim as expired even if the job deadline is several minutes away. A callback, cancellation, or timeout can then remove the claim and terminalize the job while the original PUT continues, allowing runner-output bytes to change after verification or cancellation; retain or renew the claim for the active request, and only recover abandoned claims at the bounded job deadline as intended.

AGENTS.md reference: AGENTS.md:L531-L534

Useful? React with 👍 / 👎.

Comment thread apps/web/worker/api.ts
: { beliefSpec: session.beliefSpec }),
...(session.learningDirector === undefined
? {}
: { learningDirector: session.learningDirector }),

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 Redact live model identity from session payloads

When OPENAI_BASE_URL points to a compatible provider whose Responses payload returns a provider- or deployment-specific model value, directorResult.provenance.modelId is persisted and this newly exposed learningDirector object sends it to browser state on every session response. This is a separate exposure from the hardcoded display-copy issue already reported; project provider-neutral provenance or keep the raw model identity server-side.

AGENTS.md reference: AGENTS.md:L426-L432

Useful? React with 👍 / 👎.

Comment thread apps/web/worker/api.ts
return context.json(jsonSuccess(statePayload(proposed)));
if (result.beliefSpec.supportState === "SUPPORTED") {
try {
const directorResult = await createLiveLearningDirectorFromEnv(

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 Bound the combined analyst and director request

For a supported live claim, this starts the Learning Director synchronously after the Belief Analyst has already completed, and the director may make three sequential Responses calls, each with a default 180-second timeout. The browser client aborts every ordinary API request after at most 210 seconds, so a valid tool-using analysis can outlive the caller, leaving a persisted Belief Spec or Director decision that the UI reports as failed; enforce one shared deadline below the client limit or move the director to a separately resumable request.

AGENTS.md reference: AGENTS.md:L430-L432

Useful? React with 👍 / 👎.

Comment thread apps/web/worker/api.ts
Comment on lines +4214 to +4215
scientificEngineSnapshotHash:
scientificEngineSnapshotValue.authorityHash,

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 Validate historical bundles against their recorded snapshot

After any accepted scientific-engine upgrade changes snapshot-hash.json, this compares every stored schema-v2 Proof Bundle with the new runtime snapshot rather than the snapshot recorded when the evidence was issued. Because statePayload() now runs this check for every session response, all completed live investigations from the prior engine version begin returning PROOF_BUNDLE_INVALID even though their content hash and provenance remain valid; verify historical bundles against their recorded or issuance-time snapshot instead of the current deployment.

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

Useful? React with 👍 / 👎.

const pattern = inventory.replacementEntries
.map(({ normalizedName }) => escapedRegex(normalizedName))
.join("|");
safe = safe.replace(new RegExp(pattern, "giu"), (match) => {

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 Match sensitive field names at identifier boundaries

When a supported notebook declares a short sensitive field such as ID, the case-insensitive alternation matches those letters inside unrelated words—for example, valid is rewritten as val[REDACTED_SENSITIVE_FIELD_…]. Because this sanitizer is applied to the learner claim, evidence excerpts, symbols, metrics, and schema types, ordinary packets can become badly corrupted before either reasoning request; match complete identifier tokens or syntax-aware field references rather than arbitrary substrings.

AGENTS.md reference: AGENTS.md:L434-L437

Useful? React with 👍 / 👎.

@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: 0f32b05c47

ℹ️ 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 apps/web/worker/api.ts
Comment on lines +4218 to +4220
...(session.proofBundle.integrity.mode === "hmac-signed" &&
usableSigningKey !== undefined
? { signingKey: usableSigningKey }

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 Validate stored bundles with their issuance key

When COUNTERLAB_SIGNING_KEY is rotated after an HMAC-signed Proof Bundle was issued, this always validates the historical signature with the current key. Because statePayload() now runs this check for every session response, completed investigations signed under the previous key become inaccessible and Proof Bundle export returns PROOF_BUNDLE_INVALID; retain issuance-key provenance and the corresponding verification key instead of assuming the active key signed every stored bundle.

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

Useful? React with 👍 / 👎.

Comment on lines +877 to +880
if (!callbackClaimExpired) {
throw new RunnerCallbackStateError(
`Runner callback ${parsed.idempotencyKey} is already being processed`,
);

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 Retry abandoned callback claims after their expiry

If a Worker invocation terminates after persisting this callback claim but before recordCallback() or the error handler releases it, every matching retry is rejected here for 60 seconds. The hosted runner's HttpRunnerControlPlane.callback() makes only three attempts with default delays of 250 and 500 ms (and at most 15 seconds even with its maximum configured delay), so it exhausts recovery before the claim can be reclaimed and the valid terminal callback is never projected; make retries span the claim-expiry window or allow a safely matching retry to take over.

AGENTS.md reference: AGENTS.md:L531-L533

Useful? React with 👍 / 👎.

@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: 6608ad2ab9

ℹ️ 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 on lines +89 to +93
kind: "decrease",
symbol: directionSymbols.decrease,
label: "Lower on unseen customers",
accessibleLabel:
"Downward change: the verified result is lower on unseen customers.",

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 Derive the direction cue from the verified values

For any leakage comparison whose labels mention familiar rows and unseen/new customers, this hardcodes a decrease without inspecting the signed metrics. The fixed outcome classifier explicitly accepts gaps up to 0.03 as the current-hypothesis pattern and gaps between 0.03 and 0.10 as inconclusive, including equal values or a group-holdout accuracy up to 0.02 higher (packages/concept-registry/src/index.ts lines 550-567); those valid live results would therefore display a false down arrow and “Lower on unseen customers.” Require the caller to supply a direction derived from the verified payload, or compute it from numeric values.

AGENTS.md reference: AGENTS.md:L661-L665

Useful? React with 👍 / 👎.

Comment thread apps/web/src/api.ts
reasoningDiffHash,
] = await Promise.all([
canonicalSha256(session.beliefSpec),
canonicalSha256(session.prediction),

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 Use the Prediction's immutable hash for lineage

Every genuine native Proof Capsule session records reasoningDiffV2.authority.predictionHash as prediction.immutableHash (packages/session-core/src/service.ts line 1283), but this hashes the entire Prediction object instead. Since immutableHash was computed from the Prediction fields before that property was added (apps/web/worker/api.ts lines 5622-5636), the two digests cannot match; the client therefore rejects the successful capsule-issuance response and every subsequent session refresh as NATIVE_PROOF_LINEAGE_INVALID. Compare the authority to session.prediction.immutableHash instead.

AGENTS.md reference: AGENTS.md:L967-L968

Useful? React with 👍 / 👎.

@ALikesToCode
ALikesToCode merged commit e9b2a95 into main Jul 21, 2026
2 of 4 checks passed
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.

1 participant