Skip to content

test: freeze the Core Reset baseline and held-out contract - #581

Merged
mohanagy merged 5 commits into
mainfrom
core-reset/scope-baseline
Jul 19, 2026
Merged

mohanagy merged 5 commits into
mainfrom
core-reset/scope-baseline

Conversation

@mohanagy

@mohanagy mohanagy commented Jul 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #580.

  • freezes the Core Reset evaluation contract, schemas, held-out repository revisions, questions, evidence paths, comparator protocols, refresh protocol, and break-even rules
  • adds a development-only recorder plus isolation and held-out verification tools outside src, dist, and the npm package
  • commits the clean OpenStatus v0.32.0 baseline receipt and validates that exact receipt in CI
  • completes one-owner removal-manifest review, marks Scope/Baseline Passed, and marks Directed multigraph Ready without starting implementation
  • changes no production runtime behavior

The receipt intentionally records current failures rather than treating them as acceptance failures: 398 package files, 315.601 ms CLI startup, 7 MCP tools, lost parallel edges/edge IDs, and 50% in-scope OpenStatus phase coverage. These are the frozen baseline later phases must beat.

Testing

  • npm run test:run -- --maxWorkers=1 — 205 files; 2,819 passed; 2 skipped
  • npm run typecheck
  • npm run build
  • npm run release:verify
  • npm run registry:validate
  • npm run verify:pack-parity
  • npm run pack:dry-run -- --json
  • node tools/eval/core-reset/verify-isolation.mjs
  • node tools/eval/core-reset/verify-held-out-repositories.mjs --repository openstatus=<checkout> --repository documenso=<checkout> --repository formbricks=<checkout>
  • git diff --check

Core Reset contract

  • RFC requirement: Scope and baseline
  • Parent issue: [Core Reset]: Freeze the reproducible baseline and held-out evaluation contract #580 under accepted RFC [RFC]: Madar Core Reset — narrow TypeScript semantic-path engine #577
  • Removal-manifest IDs: safe-workspace-primitives, provenance, directed-multigraph, canonical-typescript-index, generation-and-incremental, evidence-path-query, thin-delivery, evaluation-tooling
  • Exit gate: reproducible receipt, frozen held-out comparison contract, complete manifest ownership, and phase-status transition
  • Production LOC added: 0
  • Production LOC removed: 0
  • Net production LOC: 0
  • Superseded paths deleted: none; this evidence-only phase authorizes no runtime replacement
  • Development-only evaluator/test/config delta: +6,267 / -3 lines
  • Committed receipt: 865 lines / 31,482 bytes

Reset scope checks

Checklist

  • I updated the public roadmap and scorecard
  • I added schema, semantic, mutation, isolation, and exact-receipt tests
  • This PR contains only share-safe evidence and no private corpora, secrets, credentials, proprietary prompts, sensitive raw logs, or accidental raw outputs
  • This PR is limited to the approved Scope/Baseline gate

Evidence provenance

The accepted receipt was recorded from clean tooling checkout 250a637. Its production source tree is byte-for-byte the frozen runtime baseline at 33951d6, with +0 / -0 / net 0 under src/**.

Summary by CodeRabbit

  • New Features
    • Added Core Reset baseline/receipt contract validation with held-out repository preflight verification and isolation checks.
    • Introduced frozen baseline evidence artifact and schemas for evaluation contracts and baseline receipts.
  • Documentation
    • Updated Core Reset README plus roadmap/scorecard and related evidence/governance documents.
  • Tests
    • Expanded unit tests covering contract semantics, governance manifest ownership, receipt/evidence integrity, and isolation requirements.
  • CI
    • Enhanced CI with an additional Ubuntu/Linux + Node 22 validation step to verify the Core Reset evidence contract.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 88b06eb5-560e-4b3c-96ec-bd38902ed1b5

📥 Commits

Reviewing files that changed from the base of the PR and between c998e21 and de344d7.

📒 Files selected for processing (2)
  • docs/core-reset/scorecard.md
  • tools/eval/core-reset/contract-validation.mjs
🚧 Files skipped from review as they are similar to previous changes (2)
  • tools/eval/core-reset/contract-validation.mjs
  • docs/core-reset/scorecard.md

📝 Walkthrough

Walkthrough

The PR freezes a Core Reset evaluation contract, adds baseline recording and semantic validation, commits measured evidence, verifies held-out repository and package isolation, updates governance artifacts, and runs the new checks in CI.

Changes

Core Reset baseline and evaluation

Layer / File(s) Summary
Frozen contract and evaluation schemas
tools/eval/core-reset/README.md, tools/eval/core-reset/contracts/..., tools/eval/core-reset/schemas/...
Defines the frozen evaluation contract and strict schemas for contracts and baseline receipts.
Contract and receipt semantic validation
tools/eval/core-reset/contract-validation.mjs
Validates contract invariants, receipt measurements, graph and retrieval evidence, and isolation metadata.
Baseline measurement recorder
tools/eval/core-reset/record-baseline.mjs
Records package, CLI, MCP, graph, extraction, incremental, retrieval, and source-isolation measurements, then validates and writes a receipt.
Held-out repository and package isolation checks
tools/eval/core-reset/verify-held-out-repositories.mjs, tools/eval/core-reset/verify-isolation.mjs, tsconfig.build.json
Verifies frozen Git repositories and refresh fixtures, checks package isolation, and constrains TypeScript build output.
Evidence receipt and automated validation
docs/core-reset/evidence/..., tests/unit/core-reset-baseline.test.ts, tests/unit/core-reset-governance.test.ts, .github/workflows/ci.yml
Adds baseline measurements, contract and receipt tests, manifest coverage assertions, and CI validation steps.
Governance status and ownership updates
docs/core-reset/removal-manifest.yml, docs/core-reset/scorecard.md, docs/roadmap.md
Updates ownership coverage, records the baseline evidence review, and marks scope/baseline passed with directed multigraph ready.

Estimated code review effort: 5 (Critical) | ~90+ minutes

Possibly related issues

  • mohanagy/madar#577 — The PR implements the accepted Core Reset baseline, isolation, evaluation, packaging, and governance requirements.

Possibly related PRs

  • mohanagy/madar#579 — Updates the same Core Reset governance artifacts and related ownership assertions.

Suggested labels: core-reset

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: freezing the Core Reset baseline and held-out contract.
Description check ✅ Passed The description follows the template sections and includes summary, testing, Core Reset contract details, checklist, and related issue context.
Linked Issues check ✅ Passed The PR appears to satisfy #580 by adding frozen contract and baseline artifacts, validation tooling, held-out verification, and governance updates.
Out of Scope Changes check ✅ Passed The changes stay within docs, tests, tooling, and config for Core Reset and do not introduce unrelated production runtime behavior.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch core-reset/scope-baseline

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
tools/eval/core-reset/contract-validation.mjs (1)

354-356: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

canonicalSha256 should either canonicalize or be renamed. JSON.stringify is insertion-order dependent, so this hash is not RFC 8785 JCS and can change if the same object is reserialized with a different key order. For contract/dependency hashes, switch to a JCS serializer; otherwise document the ordering assumption and drop the “canonical” wording.

🤖 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 `@tools/eval/core-reset/contract-validation.mjs` around lines 354 - 356, Update
canonicalSha256 to hash values serialized with an RFC 8785 JCS-compatible
serializer instead of JSON.stringify, preserving stable hashes regardless of
object key insertion order. If no JCS serializer is available, rename the
function to remove “canonical” and document the ordering assumption for
contract/dependency hashes.
🤖 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 `@docs/core-reset/scorecard.md`:
- Line 27: Update the tooling checkout reference in the scorecard sentence to
use the complete 40-character commit SHA instead of abbreviated `250a637`,
matching the repository’s canonical pinned value and preserving the existing
runtime baseline reference.
- Line 22: Update the “OpenStatus retrieval” scorecard entry to avoid comparing
its cold startup-plus-retrieve measurement with the warm p95 target: record warm
p95 using the required warm-run sample, or mark warm p95 as unknown, while
retaining the existing cold measurement as a separate metric.

---

Nitpick comments:
In `@tools/eval/core-reset/contract-validation.mjs`:
- Around line 354-356: Update canonicalSha256 to hash values serialized with an
RFC 8785 JCS-compatible serializer instead of JSON.stringify, preserving stable
hashes regardless of object key insertion order. If no JCS serializer is
available, rename the function to remove “canonical” and document the ordering
assumption for contract/dependency hashes.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7f9f568a-6eb8-4a78-8da2-f0e03b4cb427

📥 Commits

Reviewing files that changed from the base of the PR and between 33951d6 and c998e21.

📒 Files selected for processing (16)
  • .github/workflows/ci.yml
  • docs/core-reset/evidence/baseline-v0.32.0.json
  • docs/core-reset/removal-manifest.yml
  • docs/core-reset/scorecard.md
  • docs/roadmap.md
  • tests/unit/core-reset-baseline.test.ts
  • tests/unit/core-reset-governance.test.ts
  • tools/eval/core-reset/README.md
  • tools/eval/core-reset/contract-validation.mjs
  • tools/eval/core-reset/contracts/evaluation-contract.json
  • tools/eval/core-reset/record-baseline.mjs
  • tools/eval/core-reset/schemas/baseline-receipt.schema.json
  • tools/eval/core-reset/schemas/evaluation-contract.schema.json
  • tools/eval/core-reset/verify-held-out-repositories.mjs
  • tools/eval/core-reset/verify-isolation.mjs
  • tsconfig.build.json

Comment thread docs/core-reset/scorecard.md Resolved
Comment thread docs/core-reset/scorecard.md Resolved
@mohanagy

Copy link
Copy Markdown
Owner Author

Review follow-up in de344d7:

  • separated the measured cold startup-plus-retrieve value from the unknown warm p95 gate;
  • pinned both evidence provenance commits with full SHAs;
  • addressed the maintainability nit by renaming canonicalSha256 to orderedJsonSha256 and documenting that baseline receipt hashes preserve producer key order while comparator dependency manifests use the separate frozen RFC 8785 rule.

Targeted Core Reset tests, typecheck, build, diff hygiene, and the zero src delta check pass locally.

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.

[Core Reset]: Freeze the reproducible baseline and held-out evaluation contract

1 participant