Skip to content

[Core Reset] Return strict obligation-driven retrieval dossiers - #635

Merged
mohanagy merged 4 commits into
nextfrom
agent/issue-630-obligation-dossiers-c888
Aug 2, 2026
Merged

[Core Reset] Return strict obligation-driven retrieval dossiers#635
mohanagy merged 4 commits into
nextfrom
agent/issue-630-obligation-dossiers-c888

Conversation

@mohanagy

@mohanagy mohanagy commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the v1 rank/slice/traverse pipeline with an obligation planner, bounded workflow/recovery builder, and authenticated evidence hydrator
  • return deterministic madar.retrieve v2 dossiers only when every mandatory stage, adjacent async handoff, terminal action, and proof is complete
  • add the portable 14-query issue [P0][Retrieval]: Plan obligations and return strict answer-ready workflow dossiers #630 benchmark and align packed parity/isolation verification with the active package budget
  • update Core Reset governance for the owner-approved amendment only: replacement emitted bytes 58,000 → 61,000 and npm unpacked bytes 640,000 → 655,000
  • align active public documentation with the exact v2 runtime envelope; historical v1 cleanup matchers in the installer remain intentionally unchanged

Issue: #630
Owner amendment: #630 (comment)
Protected base: c88823ecbeb6da6284cf74ecbd304e9315ffd4fa
Candidate head: 5ec3fab427985e3385a94cff1f4ef08b292c3ad2
Candidate tree: 5db67cbe19a9479409192558ea40b0ac8e3add78

Exact local gates

  • focused retrieval: 7 files / 267 tests; review-finding regressions: 5 files / 68 tests
  • full suite and coverage: 83 files / 899 tests
  • coverage: 85.6% statements, 79.94% branches, 92.02% functions, 89.07% lines
  • portable issue [P0][Retrieval]: Plan obligations and return strict answer-ready workflow dossiers #630 oracle: 14/14 ready, all four required queue handoffs, terminal persistence, and all three negative mutations rejected
  • real GoValidate: 14/14 frozen formulations ready at 3,970–3,998 tokens with all four queues; 100 warm samples p95 49.48099999999977 ms (<500 ms)
  • demo evaluation: 95% grounded recall; the honest remaining miss is the non-load-bearing PasswordPolicy parent label, above the frozen >=90% CI threshold
  • production: 44 TypeScript files / 15,871 LOC; +2,302/-2,150/net +152; source diff SHA-256 76340caade75454a96e546117c55128e1a69d15720dc60d1a800f5ceb4971693
  • replacement trio: 1,424 source LOC / 60,933 emitted bytes (ceiling 61,000)
  • package: 102 files / 155,124 packed / 653,497 unpacked bytes (unpacked ceiling 655,000)
  • package shasum 77add32848cfd6f94be700dabe78efabf2bc3ed9; integrity sha512-mj2bYY6JbNS8iIxWnq0bZSuNqdkQWlb3bLbob0wAodCxpT6iuuYFc75hhuZM7ijesm9rx94mo5iZ8VoKEsEr+g==; artifact SHA-256 1db61f9760fc933de44faa34543d97775548ac8e96fbe40cbae03623de20164a
  • typecheck, build, evaluator build, governance, package parity, isolation, Registry validation, release hygiene, npm audit, and CI evaluation regression pass
  • package manifests, dependencies, scripts, TypeScript configs, graph/index generation, public CLI/MCP input, and publication surfaces are unchanged

Merge gates

Do not merge until this exact head has all six protected CI jobs green, fresh independent exact-head review reports no blocker, and zero review threads remain.

Exact-head CodeRabbit succeeded; all six protected CI jobs passed in run 30727068191; three independent exact-head reviews found no P0/P1 blocker; and all 13 review threads are resolved.

This PR targets protected next, never main. It does not authorize npm publication, a GitHub Release, Registry publication, a tag, or any main action.

Summary by CodeRabbit

  • New Features
    • Introduced retrieval v2 with authenticated answer dossiers for locate, explain, and workflow questions.
    • Added structured evidence, proof chains, source excerpts, symbols, persistence details, and retrieval metrics.
    • Added explicit ready, incomplete, unsupported, stale, unavailable, and corrupt response states.
  • Improvements
    • Improved workflow tracing, channel handoffs, control-flow analysis, terminal persistence detection, and bounded recovery.
    • Enforced deterministic results, stronger evidence validation, and stricter resource limits.
  • Documentation
    • Updated retrieval guidance, examples, protocol descriptions, and release records for the new response model.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request replaces legacy retrieval with a version 2 obligation-driven workflow. It adds authenticated evidence hydration, structured answer dossiers, bounded proof validation, updated parity tooling, runtime fixtures, benchmarks, documentation, and Core Reset governance records.

Changes

Retrieval v2

Layer / File(s) Summary
Query planning and workflow selection
src/domain/query/types.ts, src/domain/query/plan.ts, src/domain/query/workflow.ts, tests/unit/query-plan.test.ts, tests/unit/query-workflow.test.ts
Adds query intent classification, obligation planning, bounded graph selection, workflow proofs, terminal validation, and deterministic workflow tests.
Evidence hydration and dossier assembly
src/application/evidence-hydrator.ts, src/application/retrieve-context.ts, tests/unit/evidence-hydrator.test.ts, tests/unit/retrieve-context*.test.ts, tests/unit/retrieve-v2-contract-gaps.test.ts
Adds authenticated source, entity, fact, call, edge, excerpt, and proof hydration. Retrieval returns bounded v2 dossiers or structured non-ready states.
Queue-backed runtime fixture flow
tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/**
Replaces in-memory worker registration with named BullMQ queues, explicit job types, injected registries, and persisted structured reports.
Parity and evaluation checks
.github/scripts/verify-packed-retrieval-parity.mjs, tools/eval/**, tests/unit/benchmark*.test.ts, tests/unit/stdio-server.test.ts, tests/unit/try-command.test.ts
Updates checks for ready v2 dossiers, proof chains, channel links, persistence evidence, resource metrics, deterministic hashes, and warm latency.
Core Reset phase governance
docs/core-reset/**, docs/designs/2026-07-19-core-reset.md, docs/roadmap.md, tests/unit/core-reset-governance.test.ts
Records semantic execution completion and activates obligation-driven retrieval with amended source, package, delivery, and verification limits.

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

Possibly related issues

Possibly related PRs

  • mohanagy/madar#557 — Updates the same packed retrieval parity validation flow.
  • mohanagy/madar#598 — Establishes the authenticated source-excerpt contract extended by this retrieval implementation.
  • mohanagy/madar#634 — Provides authenticated execution facts and channel evidence consumed by the new workflow and dossier pipeline.

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
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: returning strict obligation-driven retrieval dossiers.
Description check ✅ Passed The description is detailed and on-topic, and it documents the change, validation results, Core Reset scope, issue, and merge conditions.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/issue-630-obligation-dossiers-c888

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: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/pipeline/workers/db-sync.worker.ts (1)

9-25: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Provide a runtime report repository.

declare const reportRepository creates no runtime binding. When validation succeeds, Line 24 dereferences an undeclared identifier and fails the db-sync-queue job before persistence.

Inject a configured repository into DbSyncWorker, then pass it to saveStructuredReport.

🤖 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
`@tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/pipeline/workers/db-sync.worker.ts`
around lines 9 - 25, The saveStructuredReport flow currently relies on the
non-runtime reportRepository declaration. Update DbSyncWorker to receive a
configured MongoRepository<StoredReport>, then pass that repository into
saveStructuredReport and use the injected instance for update; remove the
undeclared global dependency while preserving the existing validation and return
behavior.
🧹 Nitpick comments (11)
tests/unit/core-reset-governance.test.ts (3)

742-749: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Report the missing path instead of a bare boolean. gitPathExists returns only true or false, and both call sites collapse a whole path list into one boolean. When the assertion fails, the report states only that false was received. A maintainer cannot tell which path is absent at the recorded revision. git cat-file -e also writes its fatal: message to the inherited stderr on every negative result, which adds noise to the test output.

  • tests/unit/core-reset-governance.test.ts#L742-L749: pass { stdio: 'ignore' } to execFileSync so the negative case stays silent.
  • tests/unit/core-reset-governance.test.ts#L5465-L5466: assert the filtered list of missing paths, for example expect(EVIDENCE_REPLACEMENTS.filter((path) => !gitPathExists(EVIDENCE_IMPLEMENTATION, path))).toEqual([]).
  • tests/unit/core-reset-governance.test.ts#L5943-L5944: apply the same filtered-list assertion.
🤖 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 `@tests/unit/core-reset-governance.test.ts` around lines 742 - 749, Update
gitPathExists in tests/unit/core-reset-governance.test.ts:742-749 to pass {
stdio: 'ignore' } to execFileSync, keeping missing-path checks silent. At
tests/unit/core-reset-governance.test.ts:5465-5466 and :5943-5944, replace
boolean assertions with filtered-list assertions that collect paths for which
gitPathExists returns false and expect the missing-path list to equal []; this
ensures failures identify absent paths.

2119-2152: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Assert the candidate measurements against the recorded ceilings.

The test pins delivery_limits, npm_package_budget, and the candidate measurements as independent literals. No assertion links them. If a later edit lowers a ceiling or raises a measurement, this test still passes while the manifest records a candidate that breaks its own gate. Add relational assertions so the governance gate is machine-checked.

♻️ Proposed additional assertions
const limits = obligationRetrieval.delivery_limits
const budget = obligationRetrieval.npm_package_budget
const candidate = obligationRetrieval.candidate
expect(candidate.replacement_measurement.emitted_bytes)
  .toBeLessThanOrEqual(limits.replacement_emitted_bytes_max)
expect(candidate.replacement_measurement.source_loc)
  .toBeLessThanOrEqual(limits.replacement_source_loc_max)
expect(candidate.source_measurement.production_typescript_loc)
  .toBeLessThanOrEqual(limits.total_production_loc_max)
expect(candidate.source_measurement.net).toBeLessThanOrEqual(limits.net_production_loc_max)
expect(candidate.package_measurement.files).toBeLessThanOrEqual(budget.files_max)
expect(candidate.package_measurement.packed_bytes).toBeLessThanOrEqual(budget.packed_bytes_max)
expect(candidate.package_measurement.unpacked_bytes)
  .toBeLessThanOrEqual(budget.unpacked_bytes_max)
expect(limits.replacement_emitted_bytes_max)
  .toBe(candidate.amendment.replacement_emitted_bytes_max)
expect(budget.unpacked_bytes_max).toBe(candidate.amendment.npm_unpacked_bytes_max)
🤖 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 `@tests/unit/core-reset-governance.test.ts` around lines 2119 - 2152, Add
relational governance assertions after constructing the obligation retrieval
candidate, linking candidate replacement, source, and package measurements to
their corresponding delivery limits and npm budget ceilings. Also assert that
the amendment ceiling fields match limits.replacement_emitted_bytes_max and
budget.unpacked_bytes_max, using obligationRetrieval, delivery_limits,
npm_package_budget, candidate, and amendment.

1400-1409: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract the shared manifest.current expectation. Six tests repeat the same manifest.current shape and the same in_progress identity assertion. Each phase transition requires six identical edits, and this PR performs exactly that edit six times. A drift in one site is easy to miss. Extract one helper, for example expectCurrentPhase(manifest, { withPackage: true }), that builds the object from SEMANTIC_EXECUTION_INDEX_ID, OBLIGATION_RETRIEVAL_ID, OBLIGATION_RETRIEVAL_BASE, OBLIGATION_RETRIEVAL_SOURCE, and OBLIGATION_RETRIEVAL_PACKAGE, and asserts the sole in_progress item.

  • tests/unit/core-reset-governance.test.ts#L1400-L1409: define the helper and call it here with the package fields included.
  • tests/unit/core-reset-governance.test.ts#L2687-L2696: call the helper without the package fields.
  • tests/unit/core-reset-governance.test.ts#L3551-L3560: call the helper with the package fields.
  • tests/unit/core-reset-governance.test.ts#L4065-L4070: call the helper without the package fields.
  • tests/unit/core-reset-governance.test.ts#L4319-L4324: call the helper without the package fields.
  • tests/unit/core-reset-governance.test.ts#L4950-L4962: call the helper with the package fields and the snapshot scope.
🤖 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 `@tests/unit/core-reset-governance.test.ts` around lines 1400 - 1409, Repeated
manifest.current expectations should be centralized to prevent drift. In
tests/unit/core-reset-governance.test.ts#L1400-L1409, define an
expectCurrentPhase helper that builds the shared expectation from
SEMANTIC_EXECUTION_INDEX_ID, OBLIGATION_RETRIEVAL_ID, OBLIGATION_RETRIEVAL_BASE,
and OBLIGATION_RETRIEVAL_SOURCE, includes package fields when requested, and
asserts the sole in_progress item; replace the duplicated expectations at
`#L1400-L1409` and `#L3551-L3560` with package fields, `#L2687-L2696`, `#L4065-L4070`,
and `#L4319-L4324` without package fields, and `#L4950-L4962` with package fields
plus snapshot scope.
tools/eval/core-reset/benchmark.mjs (1)

43-67: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Metric ceilings duplicate .github/scripts/verify-packed-retrieval-parity.mjs.

Lines 46-54 repeat the same numeric ceilings (selected_files <= 12, authenticated_excerpts <= 25, root_candidates <= 3, initial_candidates <= 32, explored_nodes <= 512, causal_hops <= 24, recovery_passes <= 2, recovery_frontier_nodes <= 64) also present in .github/scripts/verify-packed-retrieval-parity.mjs (lines 542-551). Extract these shared ceilings into one exported constants module used by both scripts, so a future ceiling change cannot update one gate but not the other.

🤖 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/benchmark.mjs` around lines 43 - 67, Extract the shared
retrieval metric ceilings currently asserted in retrieve into an exported
constants module, then import and reuse those constants in both benchmark.mjs
and verify-packed-retrieval-parity.mjs. Replace the duplicated numeric
thresholds for selected_files, authenticated_excerpts, root_candidates,
initial_candidates, explored_nodes, causal_hops, recovery_passes, and
recovery_frontier_nodes while preserving the existing assertions and behavior.
.github/scripts/verify-packed-retrieval-parity.mjs (1)

517-553: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Metric ceilings duplicate tools/eval/core-reset/benchmark.mjs.

Lines 542-551 repeat the same numeric ceilings (selected_files, authenticated_excerpts, root_candidates, initial_candidates, explored_nodes, causal_hops, recovery_passes, recovery_frontier_nodes) that also appear in tools/eval/core-reset/benchmark.mjs (lines 47-54). Extract these shared ceilings into one exported constants module. Two independent copies of the same gate thresholds can drift silently when one file changes and the other does not.

The channel-link proof sequence check itself (Lines 523-539) is correct.

🤖 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/scripts/verify-packed-retrieval-parity.mjs around lines 517 - 553,
Extract the shared metric ceilings for selected_files, authenticated_excerpts,
root_candidates, initial_candidates, explored_nodes, causal_hops,
recovery_passes, and recovery_frontier_nodes into one exported constants module,
then import and reuse that module in both the verification flow around the
packed-flow gate and tools/eval/core-reset/benchmark.mjs. Remove the duplicated
numeric literals while preserving the existing threshold checks and leave the
channel-link proof validation unchanged.
src/application/evidence-hydrator.ts (1)

102-134: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Mint entity aliases from a monotonic counter, not from ents.size.

ent derives the alias as e${ents.size} at Line 105, and the ops loop derives e${ents.size} at Line 176. fact deletes a speculative owner entry at Line 124, which lowers ents.size and frees an alias for reuse.

This is safe only because the delete at Line 124 runs immediately after the matching ent(owner) at Line 123, so the removed entry is always the most recently minted one. If any insertion is ever added between those two statements, two live entries receive the same eN alias, and retrieve-context.ts pack then binds proofs, links, and obligations to the wrong entity with no error.

Use a counter that never decreases so the alias space cannot collide.

🛡️ Suggested change
     cuts = new Map<string, HydratedExcerpt>(), refs = new Map<string, HydratedProof>(),
     used = new Set<string>()
+  let aliases = 0
@@
-    const a = node(id), ref = `e${ents.size}`, ch = i.channels_by_id.get(id)
+    const a = node(id), ref = `e${aliases++}`, ch = i.channels_by_id.get(id)

Apply the same aliases++ mint at Line 176.

🤖 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 `@src/application/evidence-hydrator.ts` around lines 102 - 134, Replace all
entity alias generation based on ents.size with a monotonic aliases counter,
incrementing it whenever a new entity alias is minted in ent and in the ops
loop. Ensure speculative deletion in fact cannot cause alias reuse, while
preserving existing entity references and serialization behavior.
tests/unit/evidence-hydrator.test.ts (1)

470-476: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Drop the source-text ordering assertion.

These lines read evidence-hydrator.ts and compare the character offsets of two source strings. The assertion breaks on any reformat or rename inside load, and it proves nothing about behavior. The guarantee that matters is already asserted at Lines 467-469: a symlink that escapes the indexed root yields { state: 'unavailable', subject: path }.

🧹 Suggested removal
     expect(hydrateEvidence(value.index, value.targets)).toEqual({
       state: 'unavailable', subject: path,
     })
-    const implementation = readFileSync(
-      new URL('../../src/application/evidence-hydrator.ts', import.meta.url),
-      'utf8',
-    )
-    expect(implementation.indexOf('const rel = relative(root, file)'))
-      .toBeLessThan(implementation.indexOf('buf = readFileSync(file)'))
   })

If the intent is to pin containment checks ahead of the read, add a behavioral case instead: point the symlink at a path inside the root and assert the result stays authenticated.

🤖 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 `@tests/unit/evidence-hydrator.test.ts` around lines 470 - 476, Remove the
source-text ordering assertion that reads evidence-hydrator.ts and compares the
positions of `const rel = relative(root, file)` and `buf = readFileSync(file)`.
Keep the existing behavioral assertion for symlinks escaping the indexed root;
do not replace it with another source-inspection check.
tests/unit/retrieve-context-proof-eviction.test.ts (1)

164-166: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Give the fake index the fields pack can read.

{ state: 'ready' } as never works today only because no test supplies a control group. pack reads index.operation_by_id.get(id) for every group that has a controllerOperationId. If a later test adds such a group, the call throws a TypeError, retrieveContext catches it at the dossier packing handler, and the test reports corrupt instead of the real cause.

Build the stub once with the collections pack touches.

♻️ Suggested stub
+const readyIndex = {
+  state: 'ready', operation_by_id: new Map(), operations_by_owner: new Map(),
+  channels_by_id: new Map(),
+} as never
+

Then pass readyIndex at each retrieveContext call site in this file.

🤖 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 `@tests/unit/retrieve-context-proof-eviction.test.ts` around lines 164 - 166,
Define a shared readyIndex stub in retrieve-context-proof-eviction.test.ts with
the collections and fields pack accesses, including operation_by_id, then
replace the `{ state: 'ready' } as never` argument at every retrieveContext call
site with readyIndex. Preserve the existing ready-state behavior while ensuring
control groups can be packed without TypeError.
src/domain/query/types.ts (1)

27-51: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Give the shared type aliases descriptive names.

This file is the public retrieval contract. The aliases L, M, FS, EF, MK, SF, Tag, DR, PR, OR, and WR are used across many exported types, so a reader must resolve ten one-letter symbols to understand WorkflowSelection, AnswerDossier, or RetrieveContextResult. Rename them to intent-revealing names. The change is local to this module because the aliases are not exported.

♻️ Suggested renames
-type L<T> = readonly T[]
-type M<T> = ReadonlyMap<string, T>
-type FS = 'stale' | 'unavailable' | 'corrupt'
-type EF = { state: FS; subject: string }
+type List<T> = readonly T[]
+type Index<T> = ReadonlyMap<string, T>
+type FailureState = 'stale' | 'unavailable' | 'corrupt'
+type EvidenceFailure = { state: FailureState; subject: string }

Also applies to: 92-99

🤖 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 `@src/domain/query/types.ts` around lines 27 - 51, Rename the local aliases L,
M, FS, EF, and MK to descriptive, intent-revealing names, and apply the same
treatment to the additional local aliases SF, Tag, DR, PR, OR, and WR in this
module. Update every reference within exported retrieval contracts such as
RetrieveState and RetrieveMetrics while preserving the existing types and public
API.
tests/unit/query-workflow.test.ts (1)

30-44: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Type the obligation literals instead of casting the whole plan.

The as QueryPlan cast at Line 43 suppresses checking of the object literals above it. The kind values widen to string, so a future change to ObligationKind or to QueryObligation will not fail compilation in this suite. Annotate the array so the fixtures stay bound to the contract.

♻️ Suggested typing
-function plan(intent: QueryPlan['intent'], subject = 'idea report'): QueryPlan {
-  const obligations = intent === 'workflow' ? [
+function plan(intent: QueryPlan['intent'], subject = 'idea report'): QueryPlan {
+  const obligations: readonly QueryObligation[] = intent === 'workflow' ? [
     { id: 'o1', kind: 'subject', target: subject, mandatory: true },
@@
-  return { intent, subject, terms: subject.split(' ').sort(), obligations } as QueryPlan
+  return { intent, subject, terms: subject.split(' ').sort(), obligations }
 }

Add QueryObligation to the type import from ../../src/domain/query/types.js.

🤖 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 `@tests/unit/query-workflow.test.ts` around lines 30 - 44, Update the test
fixture’s type import to include QueryObligation, annotate the obligations array
in plan with QueryObligation[], and remove the whole-object as QueryPlan cast so
each obligation literal is checked against the contract.
src/application/retrieve-context.ts (1)

71-76: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Compute serialized_tokens by bounded convergence.

seal currently estimates the final count from the count with serialized_tokens: 0. This does not guarantee that the stored value equals countTokens(json(out)). Measure the complete serialized result after each assignment, stop only when the value stabilizes, and handle capped or oscillating sequences conservatively so budget checks cannot undercount.

🤖 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 `@src/application/retrieve-context.ts` around lines 71 - 76, Update seal to
compute out.metrics.serialized_tokens through bounded iterative convergence:
assign a candidate, measure countTokens(json(out)) including that assignment,
and repeat until the stored value equals the measured value. Apply a maximum
iteration bound and conservatively retain the highest observed count if the
sequence oscillates or fails to stabilize, ensuring budget checks never
undercount.
🤖 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/removal-manifest.yml`:
- Around line 2570-2582: Qualify the package_ceiling_change constraint in the
manifest’s constraints block to explicitly permit only the already recorded
owner amendment raising npm_unpacked_bytes_max from 640,000 to 655,000, while
continuing to forbid any additional package ceiling changes. Preserve the
existing npm_package_budget.unpacked_bytes_max value and all other constraints.

In `@src/domain/query/workflow.ts`:
- Around line 202-215: Replace the two per-arc arcs.some scans inside the
channel-arc filter with lookup maps built from the pre-filter arcs array: index
arcs by source symbol and by (from, to, kind), then use constant-time lookups to
evaluate the redundant condition. Preserve the existing fact checks, hidden-edge
updates, filtering semantics, and final sort.

In
`@tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/pipeline/api/queue-registry.service.ts`:
- Around line 1-2: Declare bullmq, `@nestjs/common`, and typeorm in the fixture
workspace package.json dependencies or devDependencies so the workspace resolves
correctly. Apply this dependency fix for the affected imports in
tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/pipeline/api/queue-registry.service.ts
(lines 1-2),
tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/ideas/interface/http/idea-generation.controller.ts
(line 1), and
tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/pipeline/workers/db-sync.worker.ts
(lines 1-2); alternatively exclude the fixture from dependency resolution.
- Around line 43-48: Update QueueRegistryService.registerWorker to retain each
created Worker, and retain the four queue instances created by the service. Add
or use the owning lifecycle teardown hook to close every retained worker and
queue, ensuring all BullMQ resources are released during shutdown.

In `@tests/unit/retrieve-context.test.ts`:
- Around line 267-274: Remove the wall-clock sampling and p95 latency assertion
from the test containing the retrieveContext loop, and delete the now-unused
performance import. Rename the test so its title describes correctness or
convergence rather than a latency requirement, while preserving the existing
retrieveContext correctness assertions.

In `@tools/eval/core-reset/verify-isolation.mjs`:
- Line 267: Update the package budget overage message to use a neutral “selected
ceilings” label instead of “active ceilings,” covering both the active-phase and
evaluationPackageBudget cases while preserving the existing measurements and
limits.

---

Outside diff comments:
In
`@tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/pipeline/workers/db-sync.worker.ts`:
- Around line 9-25: The saveStructuredReport flow currently relies on the
non-runtime reportRepository declaration. Update DbSyncWorker to receive a
configured MongoRepository<StoredReport>, then pass that repository into
saveStructuredReport and use the injected instance for update; remove the
undeclared global dependency while preserving the existing validation and return
behavior.

---

Nitpick comments:
In @.github/scripts/verify-packed-retrieval-parity.mjs:
- Around line 517-553: Extract the shared metric ceilings for selected_files,
authenticated_excerpts, root_candidates, initial_candidates, explored_nodes,
causal_hops, recovery_passes, and recovery_frontier_nodes into one exported
constants module, then import and reuse that module in both the verification
flow around the packed-flow gate and tools/eval/core-reset/benchmark.mjs. Remove
the duplicated numeric literals while preserving the existing threshold checks
and leave the channel-link proof validation unchanged.

In `@src/application/evidence-hydrator.ts`:
- Around line 102-134: Replace all entity alias generation based on ents.size
with a monotonic aliases counter, incrementing it whenever a new entity alias is
minted in ent and in the ops loop. Ensure speculative deletion in fact cannot
cause alias reuse, while preserving existing entity references and serialization
behavior.

In `@src/application/retrieve-context.ts`:
- Around line 71-76: Update seal to compute out.metrics.serialized_tokens
through bounded iterative convergence: assign a candidate, measure
countTokens(json(out)) including that assignment, and repeat until the stored
value equals the measured value. Apply a maximum iteration bound and
conservatively retain the highest observed count if the sequence oscillates or
fails to stabilize, ensuring budget checks never undercount.

In `@src/domain/query/types.ts`:
- Around line 27-51: Rename the local aliases L, M, FS, EF, and MK to
descriptive, intent-revealing names, and apply the same treatment to the
additional local aliases SF, Tag, DR, PR, OR, and WR in this module. Update
every reference within exported retrieval contracts such as RetrieveState and
RetrieveMetrics while preserving the existing types and public API.

In `@tests/unit/core-reset-governance.test.ts`:
- Around line 742-749: Update gitPathExists in
tests/unit/core-reset-governance.test.ts:742-749 to pass { stdio: 'ignore' } to
execFileSync, keeping missing-path checks silent. At
tests/unit/core-reset-governance.test.ts:5465-5466 and :5943-5944, replace
boolean assertions with filtered-list assertions that collect paths for which
gitPathExists returns false and expect the missing-path list to equal []; this
ensures failures identify absent paths.
- Around line 2119-2152: Add relational governance assertions after constructing
the obligation retrieval candidate, linking candidate replacement, source, and
package measurements to their corresponding delivery limits and npm budget
ceilings. Also assert that the amendment ceiling fields match
limits.replacement_emitted_bytes_max and budget.unpacked_bytes_max, using
obligationRetrieval, delivery_limits, npm_package_budget, candidate, and
amendment.
- Around line 1400-1409: Repeated manifest.current expectations should be
centralized to prevent drift. In
tests/unit/core-reset-governance.test.ts#L1400-L1409, define an
expectCurrentPhase helper that builds the shared expectation from
SEMANTIC_EXECUTION_INDEX_ID, OBLIGATION_RETRIEVAL_ID, OBLIGATION_RETRIEVAL_BASE,
and OBLIGATION_RETRIEVAL_SOURCE, includes package fields when requested, and
asserts the sole in_progress item; replace the duplicated expectations at
`#L1400-L1409` and `#L3551-L3560` with package fields, `#L2687-L2696`, `#L4065-L4070`,
and `#L4319-L4324` without package fields, and `#L4950-L4962` with package fields
plus snapshot scope.

In `@tests/unit/evidence-hydrator.test.ts`:
- Around line 470-476: Remove the source-text ordering assertion that reads
evidence-hydrator.ts and compares the positions of `const rel = relative(root,
file)` and `buf = readFileSync(file)`. Keep the existing behavioral assertion
for symlinks escaping the indexed root; do not replace it with another
source-inspection check.

In `@tests/unit/query-workflow.test.ts`:
- Around line 30-44: Update the test fixture’s type import to include
QueryObligation, annotate the obligations array in plan with QueryObligation[],
and remove the whole-object as QueryPlan cast so each obligation literal is
checked against the contract.

In `@tests/unit/retrieve-context-proof-eviction.test.ts`:
- Around line 164-166: Define a shared readyIndex stub in
retrieve-context-proof-eviction.test.ts with the collections and fields pack
accesses, including operation_by_id, then replace the `{ state: 'ready' } as
never` argument at every retrieveContext call site with readyIndex. Preserve the
existing ready-state behavior while ensuring control groups can be packed
without TypeError.

In `@tools/eval/core-reset/benchmark.mjs`:
- Around line 43-67: Extract the shared retrieval metric ceilings currently
asserted in retrieve into an exported constants module, then import and reuse
those constants in both benchmark.mjs and verify-packed-retrieval-parity.mjs.
Replace the duplicated numeric thresholds for selected_files,
authenticated_excerpts, root_candidates, initial_candidates, explored_nodes,
causal_hops, recovery_passes, and recovery_frontier_nodes while preserving the
existing assertions and behavior.
🪄 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: 500f7f8d-fe4a-491e-b5d7-2e21773535df

📥 Commits

Reviewing files that changed from the base of the PR and between c88823e and f4e6b30.

📒 Files selected for processing (46)
  • .github/scripts/verify-packed-retrieval-parity.mjs
  • docs/core-reset/removal-manifest.yml
  • docs/core-reset/scorecard.md
  • docs/designs/2026-07-19-core-reset.md
  • docs/roadmap.md
  • src/adapters/mcp/protocol.ts
  • src/application/evidence-hydrator.ts
  • src/application/retrieve-context.ts
  • src/domain/query/plan.ts
  • src/domain/query/rank.ts
  • src/domain/query/slice.ts
  • src/domain/query/traverse.ts
  • src/domain/query/types.ts
  • src/domain/query/workflow.ts
  • tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/ideas/interface/http/idea-generation.controller.ts
  • tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/pipeline/api/pipeline-trigger.service.ts
  • tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/pipeline/api/queue-registry.service.ts
  • tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/pipeline/assembly/assembly.worker.ts
  • tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/pipeline/workers/db-sync.worker.ts
  • tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/pipeline/workers/orchestrator.worker.ts
  • tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/planning/planner.service.ts
  • tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/reports/assembly.service.ts
  • tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/research/research-agent.service.ts
  • tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/research/workers/section-research.worker.ts
  • tests/unit/benchmark-quality.test.ts
  • tests/unit/benchmark-runtime-proof.test.ts
  • tests/unit/benchmark-suite-isolation-docs.test.ts
  • tests/unit/benchmark.test.ts
  • tests/unit/core-reset-governance.test.ts
  • tests/unit/evidence-hydrator.test.ts
  • tests/unit/query-index-execution-validation.test.ts
  • tests/unit/query-plan.test.ts
  • tests/unit/query-workflow.test.ts
  • tests/unit/retrieve-context-proof-eviction.test.ts
  • tests/unit/retrieve-context.test.ts
  • tests/unit/retrieve-evidence-skeleton-adversarial.test.ts
  • tests/unit/retrieve-evidence-skeleton-regression.test.ts
  • tests/unit/retrieve-v2-contract-gaps.test.ts
  • tests/unit/sample-workspace.test.ts
  • tests/unit/stdio-server.test.ts
  • tests/unit/try-command.test.ts
  • tools/eval/core-reset/benchmark.mjs
  • tools/eval/core-reset/isolation-support.mjs
  • tools/eval/core-reset/verify-isolation.mjs
  • tools/eval/lib/infrastructure/benchmark/quality.ts
  • tools/eval/lib/infrastructure/benchmark/questions.ts
💤 Files with no reviewable changes (5)
  • src/domain/query/traverse.ts
  • src/domain/query/slice.ts
  • src/domain/query/rank.ts
  • tests/unit/retrieve-evidence-skeleton-regression.test.ts
  • tests/unit/retrieve-evidence-skeleton-adversarial.test.ts

Comment thread docs/core-reset/removal-manifest.yml
Comment thread src/domain/query/workflow.ts Outdated
Comment thread tests/unit/retrieve-context.test.ts Outdated
Comment thread tools/eval/core-reset/verify-isolation.mjs Outdated
@mohanagy

mohanagy commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Exact-head local validation and independent-review receipt

Candidate head: 6a824527f29baaa36cfdfb5eacffe5bc7b4af546
Candidate tree: 984ab2992b2131a71fee3ca3851e39c034da907f
Protected base: c88823ecbeb6da6284cf74ecbd304e9315ffd4fa

Local validation passed:

  • 83 test files / 899 tests under the exact single-worker coverage command;
  • coverage 85.6% statements, 79.93% branches, 92.02% functions, 89.07% lines;
  • typecheck, production build, evaluator build, Registry validation, release hygiene, Core Reset baseline, packed parity, npm audit, isolation, and CI demo evaluation;
  • portable [P0][Retrieval]: Plan obligations and return strict answer-ready workflow dossiers #630 benchmark 14/14 ready with all four queue handoffs, terminal persistence, three negative mutations rejected, and 100-sample warm p95 below 500 ms;
  • exact replacement 1,424 source LOC / 60,928 emitted bytes under 61,000;
  • exact package 102 files / 155,118 packed / 653,492 unpacked bytes under 655,000;
  • active public examples parse and match the v2 runtime envelope; no active v1 response markers remain.

Fresh independent exact-head review used separate Standards and Spec axes and reports no P0/P1 blocker. Earlier documentation reviewers' findings were corrected before this commit, then re-reviewed with no blocker.

The two remaining old fixture comments were answered on the exact head: the frozen 18-file corpus is intentionally static, excluded from dependency resolution/typechecking, never executed, and attested byte-for-byte. Both threads are now resolved.

Hosted exact-head CI and CodeRabbit are still pending. This receipt does not represent them as complete and does not authorize npm publication, a release, Registry publication, a tag, or main.

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

🧹 Nitpick comments (3)
examples/mcp-tool-examples.md (1)

40-55: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Align the metrics key order with the canonical serialization.

The document presents this JSON as canonical. stat() in src/application/retrieve-context.ts (lines 44-75) emits recovery_passes, then recovery_frontier_nodes, then alternate_seeds. The example places recovery_passes last. The key set is correct, only the order differs.

♻️ Proposed fix
     "causal_hops": 0,
+    "recovery_passes": 0,
     "recovery_frontier_nodes": 0,
-    "alternate_seeds": 0,
-    "recovery_passes": 0
+    "alternate_seeds": 0
🤖 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 `@examples/mcp-tool-examples.md` around lines 40 - 55, Reorder the metrics keys
in the JSON example to match the canonical order emitted by stat(): place
recovery_passes first, followed by recovery_frontier_nodes and alternate_seeds,
while leaving all values and other keys unchanged.
tools/eval/core-reset/verify-isolation.mjs (1)

291-306: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Fail with a clear message when the #630 manifest item is absent.

Lines 293-300 guard obligationRetrieval with optional chaining. Line 301 then reads obligationRetrieval.delivery_limits directly. The earlier assertion protects that access today, so the behavior is correct. However, if the manifest lacks the item, lines 117-127 already read dist outputs from an empty source list and the failure message never names the missing manifest item. An explicit precondition makes the failure self-describing.

♻️ Proposed precondition
+assert(
+  obligationRetrieval?.delivery_limits !== undefined,
+  "removal manifest is missing the obligation-driven-retrieval-630 item",
+)
 assert(
   replacementSources.length === 3
🤖 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/verify-isolation.mjs` around lines 291 - 306, The
verification flow should explicitly assert that the `#630` obligation retrieval
and its candidate manifest item exist before reading replacement measurements or
delivery_limits. Add a clear precondition near the existing `#630` assertions,
referencing obligationRetrieval, so a missing manifest item fails with a
self-describing message instead of relying on downstream access.
docs/integrations/agent-orchestration.md (1)

60-64: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Add a freshness rule before reusing dossier evidence.

A ready dossier is authenticated against the accepted graph. After a worker changes an indexed file, the old dossier can contain stale hashes or ranges. Require madar generate . and a fresh retrieve before workers or reviewers use dossier claims for changed files. Keep continuation reuse only when no indexed source changed.

🤖 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 `@docs/integrations/agent-orchestration.md` around lines 60 - 64, Update the
dossier reuse guidance in the lead agent, implementation worker, and reviewer
workflow to require running madar generate . followed by a fresh retrieve
whenever a worker changes an indexed file before relying on dossier claims for
those files. Preserve continuation-context reuse only when no indexed source has
changed.
🤖 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 @.github/workflows/ci.yml:
- Around line 75-78: Update the CI workflow step invoking
tools/eval/core-reset/benchmark.mjs so hosted GitHub Actions runs do not enforce
the environment-dependent warm retrieval p95 latency assertion. Preserve the
benchmark’s correctness and determinism assertions in CI, while restricting the
latency gate to the local reference protocol or disabling it via an explicit CI
environment flag.

In `@docs/concepts/pipelines.md`:
- Line 33: Update the retrieval-bound descriptions in docs/concepts/pipelines.md
at lines 33-33 and docs/reference/cli-and-mcp.md at lines 51-51 to include
recovery_frontier_nodes: 64 and alternate_seeds: 3, or explicitly mark each list
as non-exhaustive.

In `@docs/reference/cli-and-mcp.md`:
- Line 51: Update the bounds summary near the `question` and `budget`
documentation to include `recovery_frontier_nodes: 64` and `alternate_seeds: 3`,
matching the values documented in `docs/mcp-response-shape.md`; alternatively,
explicitly label the list as non-exhaustive.
- Line 59: Update the retrieve row’s non-ready payload description to say it
returns an exact non-ready state with its missing requirements, reason, or
failures, covering the distinct payload fields for unsupported, stale,
unavailable, and corrupt results.

In `@src/domain/query/plan.ts`:
- Around line 190-191: Update the qualified-name extraction in the plan
construction logic so the regex preserves identifiers with multiple
dot-separated segments, such as api.client.fetch, rather than truncating them
after the first separator. Keep the existing names mapping and precedence
behavior intact while ensuring all qualified segments remain in each captured
name.

In `@tests/unit/why-madar-doc.test.ts`:
- Line 30: Update the retired-term assertion in why-madar-doc.test.ts to reject
the distinctive multi-word phrase used by the retired v1 terminology instead of
the generic word “boundaries”; follow the existing phrase-based assertions on
lines 28–29, or use the quoted `"boundaries"` form only if the retired term is a
JSON field.

In `@tools/eval/core-reset/benchmark.mjs`:
- Around line 264-268: Update the controller validation in the benchmark checks
around group.controller so it accepts the selector formats emitted by
retrieve-context.ts, including single indexes, contiguous ranges such as 0-3,
and dot-separated indexes such as 0.2.5. Keep validating the controller
identifier with controls.has, and replace the Number(ordinal) safe-integer
assertion with shape validation that rejects malformed or empty selectors.

---

Nitpick comments:
In `@docs/integrations/agent-orchestration.md`:
- Around line 60-64: Update the dossier reuse guidance in the lead agent,
implementation worker, and reviewer workflow to require running madar generate .
followed by a fresh retrieve whenever a worker changes an indexed file before
relying on dossier claims for those files. Preserve continuation-context reuse
only when no indexed source has changed.

In `@examples/mcp-tool-examples.md`:
- Around line 40-55: Reorder the metrics keys in the JSON example to match the
canonical order emitted by stat(): place recovery_passes first, followed by
recovery_frontier_nodes and alternate_seeds, while leaving all values and other
keys unchanged.

In `@tools/eval/core-reset/verify-isolation.mjs`:
- Around line 291-306: The verification flow should explicitly assert that the
`#630` obligation retrieval and its candidate manifest item exist before reading
replacement measurements or delivery_limits. Add a clear precondition near the
existing `#630` assertions, referencing obligationRetrieval, so a missing manifest
item fails with a self-describing message instead of relying on downstream
access.
🪄 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: 24b67374-333f-4ad3-a5eb-97c6c57b1863

📥 Commits

Reviewing files that changed from the base of the PR and between f4e6b30 and 6a82452.

📒 Files selected for processing (37)
  • .github/workflows/ci.yml
  • README.md
  • docs/agent-governance.md
  • docs/concepts/pipelines.md
  • docs/core-reset/removal-manifest.yml
  • docs/core-reset/scorecard.md
  • docs/designs/2026-07-19-core-reset.md
  • docs/indexing-completeness.md
  • docs/integrations/agent-orchestration.md
  • docs/language-capability-matrix.md
  • docs/mcp-response-shape.md
  • docs/proof-workflows.md
  • docs/reference/cli-and-mcp.md
  • docs/roadmap.md
  • docs/security/mcp-threat-model.md
  • docs/tutorials/agent-quickstarts.md
  • docs/tutorials/getting-started.md
  • docs/tutorials/sample-workspace.md
  • examples/mcp-tool-examples.md
  • examples/why-madar.md
  • src/application/evidence-hydrator.ts
  • src/application/retrieve-context.ts
  • src/domain/query/plan.ts
  • src/domain/query/types.ts
  • src/domain/query/workflow.ts
  • tests/unit/agent-governance-doc.test.ts
  • tests/unit/canonical-index-execution-review-regressions.test.ts
  • tests/unit/core-reset-governance.test.ts
  • tests/unit/evidence-hydrator.test.ts
  • tests/unit/mcp-response-shape-doc.test.ts
  • tests/unit/query-plan.test.ts
  • tests/unit/query-workflow.test.ts
  • tests/unit/retrieve-context-proof-eviction.test.ts
  • tests/unit/retrieve-context.test.ts
  • tests/unit/why-madar-doc.test.ts
  • tools/eval/core-reset/benchmark.mjs
  • tools/eval/core-reset/verify-isolation.mjs
💤 Files with no reviewable changes (1)
  • tests/unit/evidence-hydrator.test.ts
🚧 Files skipped from review as they are similar to previous changes (9)
  • tests/unit/retrieve-context-proof-eviction.test.ts
  • src/application/evidence-hydrator.ts
  • docs/roadmap.md
  • docs/designs/2026-07-19-core-reset.md
  • docs/core-reset/removal-manifest.yml
  • src/application/retrieve-context.ts
  • src/domain/query/types.ts
  • tests/unit/retrieve-context.test.ts
  • docs/core-reset/scorecard.md

Comment thread .github/workflows/ci.yml
Comment thread docs/concepts/pipelines.md Outdated
Comment thread docs/reference/cli-and-mcp.md Outdated
Comment thread docs/reference/cli-and-mcp.md Outdated
Comment thread src/domain/query/plan.ts Outdated
Comment thread tests/unit/why-madar-doc.test.ts Outdated
Comment thread tools/eval/core-reset/benchmark.mjs
@mohanagy

mohanagy commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Exact-head merge-gate receipt

Candidate head: 5ec3fab427985e3385a94cff1f4ef08b292c3ad2
Candidate tree: 5db67cbe19a9479409192558ea40b0ac8e3add78
Protected base: c88823ecbeb6da6284cf74ecbd304e9315ffd4fa

All required gates pass on this exact head:

  • six protected CI jobs green in https://github.com/mohanagy/madar/actions/runs/30727068191;
  • CodeRabbit exact-head check green; six corrective findings were marked addressed, while the hosted-latency suggestion was declined because [P0][Retrieval]: Plan obligations and return strict answer-ready workflow dossiers #630 keeps the <500 ms gate unchanged; measured hosted p95 was 7.452 ms and the exact candidate local p95 was 3.178 ms; disposition: [Core Reset] Return strict obligation-driven retrieval dossiers #635 (comment);
  • three independent exact-head review axes report no P0/P1 blocker;
  • 13 total review threads, zero unresolved;
  • full suite 83 files / 899 tests; coverage 85.6% statements, 79.94% branches, 92.02% functions, 89.07% lines;
  • portable [P0][Retrieval]: Plan obligations and return strict answer-ready workflow dossiers #630 oracle 14/14 ready with all four queue handoffs, terminal persistence, and three negative mutations rejected;
  • source 44 TypeScript files / 15,871 LOC, +2,302/-2,150/net +152, full-index diff SHA-256 76340caade75454a96e546117c55128e1a69d15720dc60d1a800f5ceb4971693;
  • replacement 1,424 source LOC / 60,933 emitted bytes under 61,000;
  • package 102 files / 155,124 packed / 653,497 unpacked bytes under 165,000 / 655,000; shasum 77add32848cfd6f94be700dabe78efabf2bc3ed9; integrity sha512-mj2bYY6JbNS8iIxWnq0bZSuNqdkQWlb3bLbob0wAodCxpT6iuuYFc75hhuZM7ijesm9rx94mo5iZ8VoKEsEr+g==; artifact SHA-256 1db61f9760fc933de44faa34543d97775548ac8e96fbe40cbae03623de20164a;
  • no dependency, package-version, release-workflow, publication, tag, Registry, main, or target-branch change.

The live remote next tip remains the protected base above. This receipt authorizes no npm publication, release, Registry metadata, tag, or main action.

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