diff --git a/.github/scripts/verify-packed-retrieval-parity.mjs b/.github/scripts/verify-packed-retrieval-parity.mjs index 2ffc21a7..2e28b7dc 100644 --- a/.github/scripts/verify-packed-retrieval-parity.mjs +++ b/.github/scripts/verify-packed-retrieval-parity.mjs @@ -58,7 +58,8 @@ function assertPackageMeasurement(record, tarballPath) { const evaluationTooling = manifest.items?.find((item) => item.id === 'evaluation-tooling') const activePhase = manifest.items?.find((item) => item.id === manifest.current?.active_phase) const budget = activePhase?.npm_package_budget ?? evaluationTooling?.npm_package_budget - const receipt = activePhase?.corrective_release?.package_candidate + const receipt = activePhase?.terminal_language_corrective?.package_candidate + ?? activePhase?.corrective_release?.package_candidate ?? activePhase?.corrective?.package_candidate ?? manifest.current const actual = { diff --git a/docs/core-reset/removal-manifest.yml b/docs/core-reset/removal-manifest.yml index f142050b..6b464582 100644 --- a/docs/core-reset/removal-manifest.yml +++ b/docs/core-reset/removal-manifest.yml @@ -23,7 +23,7 @@ review: disposition_changes: 11 amendment: 'Source lists remain complete and de-overlapped. Issue #588 moved four guaranteed extraction orphans into the completed delete contract. Issue #592 transferred stage.ts, freshness.ts, and source-discovery.ts to evidence-path-query and doctor.ts to thin-delivery. Approved issues #596 and #599 combined the original 54-file / 29,441-LOC query closure with nine finalizer files / 3,590 LOC, yielding one completed 63-file / 33,031-LOC predecessor contract and 22 ownership transfers. proof-report.ts plus review-compare.ts remain move-to-delete changes; serve.ts changed from rebuild to delete, raising disposition_changes from 4 to 7. Owner-approved issue #602 removed stale thin-delivery ownership of deleted serve.ts, transferred package-metadata.ts and shell.ts from rebuild to evaluation-tooling move ownership, raising disposition_changes from 7 to 9, and absorbed the remaining non-core-graph-products and activation-and-extra-integrations production owners into one exact 16-file / 7,277-LOC thin-delivery deletion contract. PR #604 completed that contract without further ownership change. Owner-approved issue #606 transferred graph-source-root.ts and workspace-copy.ts from safe-workspace-primitives to evaluation-tooling, raising disposition_changes from 9 to 11, and activated the exact 20-file / 4,698-LOC move contract from protected base 317dda89f2ea5c75e7626a26b104ceca1bd04ce5. Governance activation merged at 452ad84890c012392c5e6af613e8bfeb17de45db without production source changes. PR #608 completed the exact move without changing any surviving production TypeScript or dependency. First-stage owner-approved issue #610 governance activation merged at dcb52596a3efa89f9ef5d372231ce97a91ae5f9f, then independent review stopped its uncommitted implementation under conditions 7, 8, and 13 before any implementation PR, campaign lock, provider request, or spend. First-stage owner-approved issue #612 authorizes only an eight-path governance-only v2 candidate from that exact merge; its separate activation merge approval remains required. It changes no production ownership or disposition. Issue #625 modifies five existing evidence-path-query production paths and changes no ownership or disposition. Corrective #632 completed at c88823ecbeb6da6284cf74ecbd304e9315ffd4fa. Issue #630 added exactly three production-source owners for its planner, workflow builder and evidence hydrator and completed through protected-next merge 9703a7090fd3ef3600b4ab4e298b12f0faa05a1e; existing adapter and query surfaces retain their historical owners. Graph/index generation, schemas, CLI, MCP, and package dependencies remain unchanged by the beta.5 release preparation.' cancellation_amendment: 'On 2026-07-28 the owner closed Capability Validation issues #610, #612, #614, #615, and #616 as not planned and revoked every unconsumed preparation, activation, implementation, campaign, provider, spend, and target-execution authority. No campaign ran, no comparative result exists, provider requests remain zero, and spend remains USD 0. The governance-only v2 activation remains immutable history. Issue #618 is a separate bounded retrieval repair and does not revive Capability Validation or Graphify.' - release_amendment: 'Historical release receipt: @lubab/madar@0.40.0-beta.3 was published under npm dist-tag next and GitHub prerelease v0.40.0-beta.3 from exact protected-next commit ece7d0d02643ecec08bd91aa904a4514aa845f42. Issue #625 and PR #626 subsequently completed the generic evidence-skeleton repair on protected next at b6562b715133304bd46e537b6f39008bc1e02095. Issue #627 then published @lubab/madar@0.40.0-beta.4 under npm dist-tag next and the matching GitHub prerelease from exact protected-next commit 9043320cfa08370e5cdd3911bfb9283005aa9912 and tree f51d6e75e3b806dec6caf9ff0be43fc2ab5713fc. After #630 completed, owner receipts 5155128419 and 5155128626 authorized exactly @lubab/madar@0.40.0-beta.5 under npm dist-tag next; it was published from protected-next merge 81045cc08f1df797ecb86748c9bce09db62aeebd by trusted-publishing run 30734176943. Corrective PR #637 then merged at protected-next commit 68729161699b7592bea6984e1aa22c7b4b0833e8 and tree 4500d416d0e890b1dc67c9228a2cbb49cf4220a3. Owner receipts 5157473339 and 5157473448 separately authorize exactly @lubab/madar@0.40.0-beta.6 under npm dist-tag next from a protected-next release merge for corrective manual testing before #631 qualification. npm latest remains 0.32.0. Stable 0.40.0, a GitHub Release, MCP Registry publication, any beta.6 tag, comparative claims, and main remain outside this release.' + release_amendment: 'Historical release receipt: @lubab/madar@0.40.0-beta.3 was published under npm dist-tag next and GitHub prerelease v0.40.0-beta.3 from exact protected-next commit ece7d0d02643ecec08bd91aa904a4514aa845f42. Issue #625 and PR #626 subsequently completed the generic evidence-skeleton repair on protected next at b6562b715133304bd46e537b6f39008bc1e02095. Issue #627 then published @lubab/madar@0.40.0-beta.4 under npm dist-tag next and the matching GitHub prerelease from exact protected-next commit 9043320cfa08370e5cdd3911bfb9283005aa9912 and tree f51d6e75e3b806dec6caf9ff0be43fc2ab5713fc. After #630 completed, owner receipts 5155128419 and 5155128626 authorized exactly @lubab/madar@0.40.0-beta.5 under npm dist-tag next; it was published from protected-next merge 81045cc08f1df797ecb86748c9bce09db62aeebd by trusted-publishing run 30734176943. Corrective PR #637 then merged at protected-next commit 68729161699b7592bea6984e1aa22c7b4b0833e8 and tree 4500d416d0e890b1dc67c9228a2cbb49cf4220a3. Owner receipts 5157473339 and 5157473448 separately authorized exactly @lubab/madar@0.40.0-beta.6 under npm dist-tag next; it was published from protected-next merge 66b795e76a76c6946b85e5eb878e3f576b4e3dbb and tree ff57246a55e51459836946d6b5b9853d0cdcc372 by release workflow 30746816714. Installed-package receipt 5158293324 then recorded a blocking terminal-language and zero-fallback manual-qualification failure. npm latest remains 0.32.0. Stable 0.40.0, a GitHub Release, MCP Registry publication, any beta.6 tag, comparative claims, and main remain outside this release.' current: updated_at: 2026-08-02 @@ -38,13 +38,13 @@ current: production_loc_removed: 2150 production_loc_net: 152 npm_files: 102 - npm_packed_bytes: 155257 - npm_unpacked_bytes: 653996 - npm_shasum: 4c98dd99cd321e741cabd689f0803d99e519f389 - npm_integrity: sha512-o6L/BiJ1wrTWCaK537p60pGUC5i8zY0Zqz7NqD1zW4fJl/ewjF3cgysf4dbOkY4y49DkYDTG2qoUh1DGvq2Q0Q== - npm_artifact_sha256: 12d8abe1ac3d0945c654f4df2582ac1de63f2aeee55d82d4bf5b053d92036074 + npm_packed_bytes: 155330 + npm_unpacked_bytes: 654008 + npm_shasum: c107e87c185c39e9acc0d3a33d55e4bbe2e8eb30 + npm_integrity: sha512-/is0gABnCpimVQWLdvyFBtqhhrwSkuwgYtzQIp8FDBcSqAoLqXK4E5C3CTHqLxIWWKAtNUx8o90B7TOtMb9VCg== + npm_artifact_sha256: f341a2b3e36d074b7cdad2656bb4895393b82894223489778dad7ac623069621 measurement_state: source_and_package_exact - snapshot_scope: no_fallback_corrective_beta6_manual_test_package_candidate + snapshot_scope: terminal_language_corrective_unpublished_candidate release_candidate: version: 0.40.0-beta.4 protected_anchor_commit: 9043320cfa08370e5cdd3911bfb9283005aa9912 @@ -101,8 +101,15 @@ current: parent_authorization_receipt: https://github.com/mohanagy/madar/issues/629#issuecomment-5157473448 target_branch: next npm_dist_tag: next - publication_state: authorized_pending_protected_next_release_merge - qualification_state: fixed_package_publication_pending_formal_631_gate_pending + publication_state: published_from_protected_next + publication_receipt: https://github.com/mohanagy/madar/issues/631#issuecomment-5157856602 + release_merge: 66b795e76a76c6946b85e5eb878e3f576b4e3dbb + release_tree: ff57246a55e51459836946d6b5b9853d0cdcc372 + trusted_publishing_run: https://github.com/mohanagy/madar/actions/runs/30746816714 + published_at: 2026-08-02T12:28:22Z + qualification_state: owner_manual_test_failed_terminal_language_and_zero_fallback_formal_631_gate_pending + manual_failure_receipt: https://github.com/mohanagy/madar/issues/631#issuecomment-5158293324 + frozen_graph_sha256: 1d4d10ff6e2ceac5291779303d791ac266118b299f5c4c314614076b1661707f package_candidate: npm_files: 102 npm_packed_bytes: 155257 @@ -2688,7 +2695,7 @@ items: dependency_state: satisfied_by_9703a7090fd3ef3600b4ab4e298b12f0faa05a1e provider_traffic_or_spend: requires_separate_owner_authorization beta_publication: authorized_exact_0.40.0-beta.5_by_receipt_5155128419 - corrective_beta_publication: authorized_exact_0.40.0-beta.6_by_receipt_5157473339 + corrective_beta_publication: published_exact_0.40.0-beta.6_by_receipt_5157856602 stable_or_latest_publication: forbidden github_release: forbidden registry_metadata_publication: forbidden @@ -2734,6 +2741,59 @@ items: retrieval_budget_change: forbidden package_ceiling_change: forbidden publication: forbidden + terminal_language_corrective: + status: local_candidate + authorization_receipt: https://github.com/mohanagy/madar/issues/631#issuecomment-5158293324 + protected_base: 66b795e76a76c6946b85e5eb878e3f576b4e3dbb + protected_base_tree: ff57246a55e51459836946d6b5b9853d0cdcc372 + target_branch: next + modified_sources: + - src/domain/query/plan.ts + test_sources: + - tests/unit/query-plan.test.ts + - tests/unit/retrieve-v2-contract-gaps.test.ts + production_loc_change: 0 + production_loc_budget: + added_max: 68 + removed_min: 68 + net_max: 0 + source_measurement: + production_typescript_files: 44 + production_typescript_loc: 15871 + added: 68 + removed: 68 + net: 0 + diff_sha256: 2a95f969db7c41bc5882ed1b252029150b0f6e4e9c407a0a37bc50bfbc03f201 + replacement_measurement: + source_loc: 1424 + emitted_bytes: 60995 + package_candidate: + npm_files: 102 + npm_packed_bytes: 155330 + npm_unpacked_bytes: 654008 + npm_shasum: c107e87c185c39e9acc0d3a33d55e4bbe2e8eb30 + npm_integrity: sha512-/is0gABnCpimVQWLdvyFBtqhhrwSkuwgYtzQIp8FDBcSqAoLqXK4E5C3CTHqLxIWWKAtNUx8o90B7TOtMb9VCg== + npm_artifact_sha256: f341a2b3e36d074b7cdad2656bb4895393b82894223489778dad7ac623069621 + parity_state: passed + frozen_graph: + sha256: 1d4d10ff6e2ceac5291779303d791ac266118b299f5c4c314614076b1661707f + exact_prompt_state: ready + required_obligations: 7 + proven_obligations: 7 + selected_files: 9 + authenticated_excerpts: 12 + causal_hops: 20 + constraints: + dependency_or_lock_change: forbidden + graph_or_index_change: forbidden + query_result_schema_change: forbidden + retrieval_budget_change: forbidden + package_ceiling_change: forbidden + npm_publication: forbidden + github_release: forbidden + registry_metadata_publication: forbidden + tag: forbidden + main_target: forbidden corrective_release: version: 0.40.0-beta.6 preparation_anchor_commit: 68729161699b7592bea6984e1aa22c7b4b0833e8 @@ -2742,7 +2802,14 @@ items: parent_authorization_receipt: https://github.com/mohanagy/madar/issues/629#issuecomment-5157473448 target_branch: next npm_dist_tag: next - publication_state: authorized_pending_protected_next_release_merge + publication_state: published_from_protected_next + publication_receipt: https://github.com/mohanagy/madar/issues/631#issuecomment-5157856602 + release_merge: 66b795e76a76c6946b85e5eb878e3f576b4e3dbb + release_tree: ff57246a55e51459836946d6b5b9853d0cdcc372 + trusted_publishing_run: https://github.com/mohanagy/madar/actions/runs/30746816714 + published_at: 2026-08-02T12:28:22Z + qualification_state: owner_manual_test_failed_terminal_language_and_zero_fallback_formal_631_gate_pending + manual_failure_receipt: https://github.com/mohanagy/madar/issues/631#issuecomment-5158293324 package_candidate: npm_files: 102 npm_packed_bytes: 155257 @@ -2755,7 +2822,7 @@ items: registry_metadata_publication: forbidden tag: forbidden main_target: forbidden - notes: 'Issues #632 and #630 are complete and beta.5 is immutable published manual-test history. The beta.5 owner test found one generic workflow-bound parser defect and one ready-state client-handoff defect before formal #631 qualification. Corrective receipt 5157008370 authorized exactly two zero-net production-source modifications plus the zero-fallback evaluator correction from protected next 81045cc08f1df797ecb86748c9bce09db62aeebd; PR #637 merged the reviewed correction at protected-next commit 68729161699b7592bea6984e1aa22c7b4b0833e8 and tree 4500d416d0e890b1dc67c9228a2cbb49cf4220a3. Both exact owner prompts return ready 7/7 against the same real-GoValidate flow/evidence corridor without changing graph, index, selection, result schema, dependencies, retrieval budgets, or package ceilings. Separate owner receipts 5157473339 and 5157473448 authorize only exact beta.6 npm-next publication from a protected-next release merge for corrective manual testing. No comparative claim or provider campaign exists yet; stable/latest, GitHub Release, Registry publication, a tag and main remain forbidden.' + notes: 'Issues #632 and #630 are complete and beta.5 is immutable published manual-test history. The beta.5 owner test found one generic workflow-bound parser defect and one ready-state client-handoff defect before formal #631 qualification. Corrective receipt 5157008370 authorized exactly two zero-net production-source modifications plus the zero-fallback evaluator correction from protected next 81045cc08f1df797ecb86748c9bce09db62aeebd; PR #637 merged the reviewed correction at protected-next commit 68729161699b7592bea6984e1aa22c7b4b0833e8 and tree 4500d416d0e890b1dc67c9228a2cbb49cf4220a3. Owner receipts 5157473339 and 5157473448 authorized beta.6, which was published from protected-next merge 66b795e76a76c6946b85e5eb878e3f576b4e3dbb by workflow 30746816714. Installed-package receipt 5158293324 then recorded a blocking failure: the exact finished-report prompt was incomplete at 6/7 and the natural client fell back to repository tools. The focused local terminal-language corrective remains unpublished and is not the final ten-stage comparator or zero-fallback qualification. No comparative claim or provider campaign exists yet; stable/latest, GitHub Release, Registry publication, a tag and main remain forbidden.' exit_gate: The installed exact-head package matches or beats the strongest frozen baseline, scores at least 90 mean with no run below 85 or critical error, makes one Madar retrieval with zero repository-tool fallback in natural-client runs, and passes closed-book, parity, budget, CI, independent-review, and zero-thread gates. - id: non-core-graph-products diff --git a/docs/core-reset/scorecard.md b/docs/core-reset/scorecard.md index d28770d5..37b35095 100644 --- a/docs/core-reset/scorecard.md +++ b/docs/core-reset/scorecard.md @@ -2,7 +2,7 @@ > **RFC:** [#577](https://github.com/mohanagy/madar/issues/577) > **Milestone:** [`v0.40.0 — Core Reset`](https://github.com/mohanagy/madar/milestone/7) -> **Status:** accepted; semantic execution index #632 and obligation-driven retrieval #630 are complete; `0.40.0-beta.5` is immutable published manual-test history; corrective PR #637 merged to protected `next` at `68729161699b7592bea6984e1aa22c7b4b0833e8`; owner receipts on [#631](https://github.com/mohanagy/madar/issues/631#issuecomment-5157473339) and [#629](https://github.com/mohanagy/madar/issues/629#issuecomment-5157473448) authorize exactly `0.40.0-beta.6` under npm `next` for fixed-package testing before #631 qualification; npm `latest` remains `0.32.0`; stable release, GitHub Release, MCP Registry publication, beta.6 tag, comparative claims, and `main` remain unauthorized +> **Status:** accepted; semantic execution index #632 and obligation-driven retrieval #630 are complete; `0.40.0-beta.5` and `0.40.0-beta.6` are immutable published manual-test history; [beta.6 publication receipt](https://github.com/mohanagy/madar/issues/631#issuecomment-5157856602) records protected `next` merge `66b795e76a76c6946b85e5eb878e3f576b4e3dbb`; its [installed-package failure receipt](https://github.com/mohanagy/madar/issues/631#issuecomment-5158293324) records a blocking terminal-language and zero-fallback failure; a focused unpublished corrective is in progress; npm `latest` remains `0.32.0`; stable release, GitHub Release, MCP Registry publication, beta.6 tag, comparative claims, and `main` remain unauthorized This is the phase-gate evidence ledger. An issue or PR link is not evidence by itself; each gate needs a reproducible test, receipt, measurement, or external-user record. @@ -45,12 +45,12 @@ The schema-validated, share-safe receipt was recorded at tooling checkout `250a6 | Retrieval regression #625 | **Passed** | Replace phrase-gated recovery with a generic bounded, graph-coherent evidence skeleton/forest without exceeding the inherited package ceilings | [#625](https://github.com/mohanagy/madar/issues/625) completed through [PR #626](https://github.com/mohanagy/madar/pull/626), merged at `b6562b715133304bd46e537b6f39008bc1e02095`; [six-job CI](https://github.com/mohanagy/madar/actions/runs/30533140531), independent exact-head review, CodeRabbit PASS, and zero unresolved threads | | Semantic execution index #632 | **Passed** | Authenticated ordered body facts, exact async channels and receiver/type-proven persistence pass every source, graph, indexing, latency, package, CI, review and zero-thread gate | [#632](https://github.com/mohanagy/madar/issues/632); corrective [PR #634](https://github.com/mohanagy/madar/pull/634) passed all six CI jobs, independent review, CodeRabbit and zero unresolved threads, then merged as `c88823ecbeb6da6284cf74ecbd304e9315ffd4fa` with tree `b715764668b4296e9e8ab4da715374f47af137db` | | Obligation-driven retrieval #630 | **Passed** | Return a complete authenticated workflow dossier or exact missing obligations within amended budgets | [PR #635](https://github.com/mohanagy/madar/pull/635) passed exact-head source/package, focused 267/267, full 899/899, coverage, 14/14 real-GoValidate, 100-sample warm p95, parity, release, Registry validation, isolation, audit, typecheck/build/build-eval, six-job CI, CodeRabbit, independent review and 13/13 resolved-thread gates; protected squash merge `9703a7090fd3ef3600b4ab4e298b12f0faa05a1e` preserved reviewed tree `5db67cbe19a9479409192558ea40b0ac8e3add78` | -| No-fallback qualification #631 | **In progress — beta.6 publication pending** | Installed exact-head package matches or beats the strongest frozen baseline and requires zero repository-tool fallback | [#631](https://github.com/mohanagy/madar/issues/631); beta.5 exposed corrective defects, PR #637 merged their fix, and beta.6 publication is authorized; the formal frozen comparison has not started | +| No-fallback qualification #631 | **In progress — beta.6 manual gate failed** | Installed exact-head package matches or beats the strongest frozen baseline and requires zero repository-tool fallback | [#631](https://github.com/mohanagy/madar/issues/631); published beta.6 failed the exact finished-report and natural-client zero-fallback gate; a focused unpublished corrective is in progress, while the formal frozen comparison has not started | | External validation | **Deferred** | Activation, retention, and paid-intent evidence remains required for later stable claims, not this beta | No external-validation claim in `0.40.0-beta.4` | -| Beta release | **Beta.5 published / beta.6 authorized** | Preserve exact beta.5 history and publish beta.6 only from its exact protected-`next` release merge for corrective manual testing | [beta.5 receipt](https://github.com/mohanagy/madar/issues/631#issuecomment-5155719419); [beta.6 owner receipt](https://github.com/mohanagy/madar/issues/631#issuecomment-5157473339); exact beta.6 candidate 102 files / 155,257 packed / 653,996 unpacked with shasum `4c98dd99cd321e741cabd689f0803d99e519f389`; no stable/latest, GitHub Release, Registry publication, tag, or `main` | +| Beta release | **Beta.5 and beta.6 published** | Preserve both immutable artifacts and do not republish the unpublished #631 corrective without new owner authorization | [beta.5 receipt](https://github.com/mohanagy/madar/issues/631#issuecomment-5155719419); [beta.6 receipt](https://github.com/mohanagy/madar/issues/631#issuecomment-5157856602); exact beta.6 artifact 102 files / 155,257 packed / 653,996 unpacked with shasum `4c98dd99cd321e741cabd689f0803d99e519f389`; no stable/latest, GitHub Release, Registry publication, tag, or `main` | | Stable release | Not started | Every separately retained stable gate passed; old core absent; migration docs ready | Pending; the beta does not satisfy this gate | -Issues `#622`, `#625`, `#632`, and `#630` are complete on `next`. Evaluation Tooling Isolation completed through #606 and PR #608 at 43 production files / 11,956 LOC; #618 completed at 43 production files / 12,008 LOC with `+69/-17/net +52`; #622 completed at 43 production files / 12,147 LOC with `+164/-25/net +139`; and #625 completed at 43 production files / 12,454 LOC with `+1,409/-1,102/net +307` against its protected base. Beta.5 is immutable published history at exact protected-`next` commit `81045cc08f1df797ecb86748c9bce09db62aeebd`. Capability Validation issues #610, #612, #614, #615, and #616 are closed not planned: no campaign ran, provider requests remain zero, and paid spend remains USD 0. #630 completed at exact protected-`next` merge `9703a7090fd3ef3600b4ab4e298b12f0faa05a1e`; corrective PR #637 merged at `68729161699b7592bea6984e1aa22c7b4b0833e8`; #631 is ready for beta.6 publication, owner testing, and later formal qualification. +Issues `#622`, `#625`, `#632`, and `#630` are complete on `next`. Evaluation Tooling Isolation completed through #606 and PR #608 at 43 production files / 11,956 LOC; #618 completed at 43 production files / 12,008 LOC with `+69/-17/net +52`; #622 completed at 43 production files / 12,147 LOC with `+164/-25/net +139`; and #625 completed at 43 production files / 12,454 LOC with `+1,409/-1,102/net +307` against its protected base. Beta.5 is immutable published history at exact protected-`next` commit `81045cc08f1df797ecb86748c9bce09db62aeebd`; beta.6 is immutable published history at protected-`next` commit `66b795e76a76c6946b85e5eb878e3f576b4e3dbb` and failed its installed manual qualification. Capability Validation issues #610, #612, #614, #615, and #616 are closed not planned: no campaign ran, provider requests remain zero, and paid spend remains USD 0. #630 completed at exact protected-`next` merge `9703a7090fd3ef3600b4ab4e298b12f0faa05a1e`; corrective PR #637 merged at `68729161699b7592bea6984e1aa22c7b4b0833e8`; #631 now owns a focused unpublished corrective before later formal qualification. ### Directed multigraph phase evidence (passed) @@ -194,7 +194,7 @@ The following contract facts are historical. Issues #610 and #612, together with - `@lubab/madar@0.40.0-beta.4` is published under npm `next` from exact protected-`next` commit `9043320cfa08370e5cdd3911bfb9283005aa9912` and tree `f51d6e75e3b806dec6caf9ff0be43fc2ab5713fc`; tag `v0.40.0-beta.4` and the matching [GitHub prerelease](https://github.com/mohanagy/madar/releases/tag/v0.40.0-beta.4) target that commit. - The published npm 12.0.1 artifact is 102 files / 159,937 packed / 639,875 unpacked bytes with shasum `c5250a0d308b3d6df374851154ddb393a678a992`, integrity `sha512-772P+n4Cx55nqC+CAx8A1aTJ2rY4yk1hUH45lAlxNMMw4YRj8hhswgDiCwczS5hx1S3a+Z+KUv2jma/zWjQZ6w==`, and tarball SHA-256 `8bd8d501b8cd3546e16a5a1ddac1f7649434e685517e1171fbd5897515e76e6b`. -- npm `latest` remains `0.32.0`. Beta.5 is immutable published manual-test history, and exact beta.6 npm-`next` corrective publication is separately authorized; stable release, GitHub Release, MCP Registry publication, beta.6 tag, new comparative claims, and `main` remain out of scope. +- npm `latest` remains `0.32.0`. Beta.5 and beta.6 are immutable published manual-test history; beta.6 failed its installed manual qualification, and the focused correction is not authorized for publication. Stable release, GitHub Release, MCP Registry publication, beta.6 tag, new comparative claims, and `main` remain out of scope. ### Semantic execution index #632 (passed) @@ -212,7 +212,7 @@ The following contract facts are historical. Issues #610 and #612, together with - [#630](https://github.com/mohanagy/madar/issues/630) starts from protected `next` commit `c88823ecbeb6da6284cf74ecbd304e9315ffd4fa` and tree `b715764668b4296e9e8ab4da715374f47af137db`. It owns explicit obligations, bounded recovery, strict answerability and the `madar.retrieve` v2 dossier. - The completed #630 implementation measures 44 production files / 15,871 LOC at `+2,302/-2,150/net +152` with full-index diff SHA-256 `76340caade75454a96e546117c55128e1a69d15720dc60d1a800f5ceb4971693`; its replacement planner, workflow and hydrator total 1,424 source LOC / 60,933 emitted bytes, and its exact package is 102 files / 155,124 packed / 653,497 unpacked bytes. Owner [amendment](https://github.com/mohanagy/madar/issues/630#issuecomment-5153369147) changed only the replacement emitted ceiling and npm unpacked ceiling; both pass. The focused suite, full suite, coverage, portable CI oracle, all 14 real-GoValidate formulations, 100-sample warm reference, six exact-head CI jobs, CodeRabbit, independent review, and all 13 review threads passed before protected squash merge `9703a7090fd3ef3600b4ab4e298b12f0faa05a1e` preserved reviewed tree `5db67cbe19a9479409192558ea40b0ac8e3add78`. -- [#631](https://github.com/mohanagy/madar/issues/631) has an active pre-qualification corrective release preparation. Exact beta.6 npm-`next` publication is authorized only to test the merged #637 correction before the formal installed-package and no-fallback comparison; it is not a qualification result. +- [#631](https://github.com/mohanagy/madar/issues/631) has an active focused terminal-language corrective after published beta.6 failed its installed exact-prompt and zero-fallback manual gate. The local correction is not a qualification result and has no npm-publication authority. - Neither issue authorizes provider traffic or spend, a GitHub Release, external Registry metadata publication, a beta.6 tag, stable/`latest`, or `main`; any real comparator campaign requires separate owner authorization. ## Graph gates diff --git a/docs/designs/2026-07-19-core-reset.md b/docs/designs/2026-07-19-core-reset.md index edfb3796..6b18f56f 100644 --- a/docs/designs/2026-07-19-core-reset.md +++ b/docs/designs/2026-07-19-core-reset.md @@ -3,7 +3,7 @@ > **Tracking issue:** [#577](https://github.com/mohanagy/madar/issues/577) > **Milestone:** [`v0.40.0 — Core Reset`](https://github.com/mohanagy/madar/milestone/7) > **Project:** [Madar Roadmap](https://github.com/users/mohanagy/projects/8) -> **Status:** accepted — semantic execution index #632 and obligation-driven retrieval #630 are complete; `0.40.0-beta.5` is immutable published manual-test history; corrective PR #637 merged to protected `next` at `68729161699b7592bea6984e1aa22c7b4b0833e8`; exact `0.40.0-beta.6` npm-`next` publication is authorized for fixed-package testing before #631 qualification; Capability Validation remains cancelled; npm `latest`, stable release, GitHub Release, MCP Registry publication, beta.6 tag, comparative claims, and `main` remain unauthorized +> **Status:** accepted — semantic execution index #632 and obligation-driven retrieval #630 are complete; `0.40.0-beta.5` and `0.40.0-beta.6` are immutable published manual-test history; beta.6 published from protected `next` merge `66b795e76a76c6946b85e5eb878e3f576b4e3dbb` and then failed the installed terminal-language and zero-fallback manual gate; a focused unpublished #631 corrective is in progress; Capability Validation remains cancelled; npm `latest`, stable release, GitHub Release, MCP Registry publication, beta.6 tag, comparative claims, and `main` remain unauthorized ## Decision @@ -506,7 +506,7 @@ The release preparation may update version/package metadata, changelog and relea The beta.5 owner test found one generic workflow-bound parser defect and one ready-state client-handoff defect. Corrective PR #637 fixed those gaps with zero net production LOC, passed all six exact-head CI jobs, CodeRabbit, independent review and zero unresolved threads, then merged to protected `next` at `68729161699b7592bea6984e1aa22c7b4b0833e8`, preserving tree `4500d416d0e890b1dc67c9228a2cbb49cf4220a3`. -Matching owner receipts on [#631](https://github.com/mohanagy/madar/issues/631#issuecomment-5157473339) and [#629](https://github.com/mohanagy/madar/issues/629#issuecomment-5157473448) authorize exactly `@lubab/madar@0.40.0-beta.6` under npm dist-tag `next` from the protected-`next` release merge descending from that correction. The exact npm 12.0.1 candidate is 102 files / 155,257 packed / 653,996 unpacked bytes, shasum `4c98dd99cd321e741cabd689f0803d99e519f389`, integrity `sha512-o6L/BiJ1wrTWCaK537p60pGUC5i8zY0Zqz7NqD1zW4fJl/ewjF3cgysf4dbOkY4y49DkYDTG2qoUh1DGvq2Q0Q==`, and tarball SHA-256 `12d8abe1ac3d0945c654f4df2582ac1de63f2aeee55d82d4bf5b053d92036074`. It enables fixed-package testing but is not a #631 qualification result. Production code, dependencies, graph/index/query semantics, CLI, MCP and retrieval budgets remain unchanged by the release preparation. npm `latest`, stable release, GitHub Release, external MCP Registry publication, a beta.6 git tag, comparative claims, and `main` are forbidden. +Matching owner receipts on [#631](https://github.com/mohanagy/madar/issues/631#issuecomment-5157473339) and [#629](https://github.com/mohanagy/madar/issues/629#issuecomment-5157473448) authorized exactly `@lubab/madar@0.40.0-beta.6` under npm dist-tag `next`. [Publication receipt 5157856602](https://github.com/mohanagy/madar/issues/631#issuecomment-5157856602) records protected merge `66b795e76a76c6946b85e5eb878e3f576b4e3dbb`, tree `ff57246a55e51459836946d6b5b9853d0cdcc372`, and release workflow 30746816714. The immutable artifact is 102 files / 155,257 packed / 653,996 unpacked bytes, shasum `4c98dd99cd321e741cabd689f0803d99e519f389`, integrity `sha512-o6L/BiJ1wrTWCaK537p60pGUC5i8zY0Zqz7NqD1zW4fJl/ewjF3cgysf4dbOkY4y49DkYDTG2qoUh1DGvq2Q0Q==`, and tarball SHA-256 `12d8abe1ac3d0945c654f4df2582ac1de63f2aeee55d82d4bf5b053d92036074`. [Installed-package receipt 5158293324](https://github.com/mohanagy/madar/issues/631#issuecomment-5158293324) then recorded an incomplete 6/7 finished-report result and natural-client repository fallback. The focused terminal-language corrective remains unpublished and is not the final #631 qualification. npm `latest`, stable release, GitHub Release, external MCP Registry publication, a beta.6 git tag, comparative claims, and `main` are forbidden. ## Migration and compatibility @@ -641,4 +641,4 @@ On 2026-07-26 the owner approved the original Capability Validation proposal has | 2026-08-02 | Obligation-driven retrieval #630 complete | PR #635 passed six exact-head CI jobs, CodeRabbit, three independent review axes, and all 13 review threads, then squash-merged to protected `next` as `9703a7090fd3ef3600b4ab4e298b12f0faa05a1e`, preserving reviewed tree `5db67cbe19a9479409192558ea40b0ac8e3add78`. The replacement and package pass the owner-amended 61,000-emitted-byte and 655,000-unpacked-byte ceilings. | | 2026-08-02 | `0.40.0-beta.5` manual-test release published | Owner receipts on #631 and #629 authorized exactly `@lubab/madar@0.40.0-beta.5`; protected merge `81045cc08f1df797ecb86748c9bce09db62aeebd` triggered trusted publication under npm `next`. npm `latest` remained `0.32.0`; no GitHub Release, Registry publication, beta.5 tag, comparative claim, or `main` action occurred. | | 2026-08-02 | Beta.5 corrective gaps fixed | PR #637 fixed generic workflow-bound parsing, ready-state client handoff guidance, and whole-trace zero-fallback evaluation, then merged to protected `next` at `68729161699b7592bea6984e1aa22c7b4b0833e8` with reviewed tree `4500d416d0e890b1dc67c9228a2cbb49cf4220a3`. Formal #631 qualification remains pending. | -| 2026-08-02 | `0.40.0-beta.6` corrective release authorized | Owner receipts on #631 and #629 authorize exactly `@lubab/madar@0.40.0-beta.6` under npm `next` from the protected-`next` release merge descending from `68729161699b7592bea6984e1aa22c7b4b0833e8`. npm `latest`, stable release, GitHub Release, Registry publication, beta.6 tag, comparative claims, and `main` remain forbidden. | +| 2026-08-02 | `0.40.0-beta.6` published; manual qualification failed | Owner receipts authorized exactly `@lubab/madar@0.40.0-beta.6`; protected merge `66b795e76a76c6946b85e5eb878e3f576b4e3dbb` published it under npm `next`. Installed-package receipt 5158293324 records the blocking 6/7 finished-report result and repository fallback. The focused correction is unpublished; npm `latest`, stable release, GitHub Release, Registry publication, beta.6 tag, comparative claims, and `main` remain forbidden. | diff --git a/docs/roadmap.md b/docs/roadmap.md index a336b223..c859820b 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -11,7 +11,7 @@ Madar is executing an accepted Core Reset. The roadmap is outcome-driven: work a - [Removal manifest](core-reset/removal-manifest.yml) — keep, rebuild, move, delete, and defer decisions - [Scorecard](core-reset/scorecard.md) — technical and business evidence gates -The RFC is **accepted**. Scope and baseline, Directed multigraph, Canonical TypeScript/JavaScript index, the combined legacy/non-code deletion, Generation and reconciliation, Evidence-path query, Thin Delivery, Evaluation Tooling Isolation, the bounded retrieval repairs in [#618](https://github.com/mohanagy/madar/issues/618), [#622](https://github.com/mohanagy/madar/issues/622), and [#625](https://github.com/mohanagy/madar/issues/625), semantic execution index [#632](https://github.com/mohanagy/madar/issues/632), and obligation-driven retrieval [#630](https://github.com/mohanagy/madar/issues/630) have passed. Capability Validation and the earlier Native-vs-Graphify campaign are cancelled history. `0.40.0-beta.5` is immutable published manual-test history, and corrective [PR #637](https://github.com/mohanagy/madar/pull/637) merged to protected `next` at `68729161699b7592bea6984e1aa22c7b4b0833e8`. Owner receipts on [#631](https://github.com/mohanagy/madar/issues/631#issuecomment-5157473339) and [#629](https://github.com/mohanagy/madar/issues/629#issuecomment-5157473448) authorize exactly `0.40.0-beta.6` under npm `next` so the merged correction can be tested before formal qualification. npm `latest` remains `0.32.0`; stable release, GitHub Release, MCP Registry publication, a beta.6 tag, comparative claims, and `main` remain unauthorized. +The RFC is **accepted**. Scope and baseline, Directed multigraph, Canonical TypeScript/JavaScript index, the combined legacy/non-code deletion, Generation and reconciliation, Evidence-path query, Thin Delivery, Evaluation Tooling Isolation, the bounded retrieval repairs in [#618](https://github.com/mohanagy/madar/issues/618), [#622](https://github.com/mohanagy/madar/issues/622), and [#625](https://github.com/mohanagy/madar/issues/625), semantic execution index [#632](https://github.com/mohanagy/madar/issues/632), and obligation-driven retrieval [#630](https://github.com/mohanagy/madar/issues/630) have passed. Capability Validation and the earlier Native-vs-Graphify campaign are cancelled history. `0.40.0-beta.5` and `0.40.0-beta.6` are immutable published manual-test history. Beta.6 was published from protected `next` merge `66b795e76a76c6946b85e5eb878e3f576b4e3dbb`, then its installed-package test recorded a blocking terminal-language and zero-fallback failure on [#631](https://github.com/mohanagy/madar/issues/631#issuecomment-5158293324). A focused unpublished corrective is in progress. npm `latest` remains `0.32.0`; stable release, GitHub Release, MCP Registry publication, a beta.6 tag, comparative claims, and `main` remain unauthorized. ## Passed — directed multigraph @@ -181,13 +181,13 @@ The completed implementation replaces the v1 rank/slice/traverse pipeline with o The original owner receipts on [#631](https://github.com/mohanagy/madar/issues/631#issuecomment-5155128419) and [#629](https://github.com/mohanagy/madar/issues/629#issuecomment-5155128626) authorized `@lubab/madar@0.40.0-beta.5`. It was published under npm `next` from protected merge `81045cc08f1df797ecb86748c9bce09db62aeebd` by [trusted-publishing run 30734176943](https://github.com/mohanagy/madar/actions/runs/30734176943). The immutable artifact is 102 files / 155,157 packed / 653,565 unpacked bytes with shasum `d637297412ec5b868586ba59142fbefdcfc0d5e0`. No git tag, GitHub Release, Registry publication, stable/`latest`, or `main` action occurred. -## Authorized corrective manual-test candidate — `0.40.0-beta.6` +## Published corrective manual-test candidate — `0.40.0-beta.6` -The beta.5 owner test exposed a generic workflow-bound parsing defect and a ready-state client handoff defect. Corrective [PR #637](https://github.com/mohanagy/madar/pull/637) fixed those gaps with zero net production LOC and merged to protected `next` at `68729161699b7592bea6984e1aa22c7b4b0833e8`, preserving reviewed tree `4500d416d0e890b1dc67c9228a2cbb49cf4220a3`. Matching owner receipts on [#631](https://github.com/mohanagy/madar/issues/631#issuecomment-5157473339) and [#629](https://github.com/mohanagy/madar/issues/629#issuecomment-5157473448) authorize exactly `@lubab/madar@0.40.0-beta.6` under npm `next`. The sealed npm 12.0.1 candidate is 102 files / 155,257 packed / 653,996 unpacked bytes with shasum `4c98dd99cd321e741cabd689f0803d99e519f389` and tarball SHA-256 `12d8abe1ac3d0945c654f4df2582ac1de63f2aeee55d82d4bf5b053d92036074`. +The beta.5 owner test exposed a generic workflow-bound parsing defect and a ready-state client handoff defect. Corrective [PR #637](https://github.com/mohanagy/madar/pull/637) fixed those gaps with zero net production LOC and merged to protected `next` at `68729161699b7592bea6984e1aa22c7b4b0833e8`, preserving reviewed tree `4500d416d0e890b1dc67c9228a2cbb49cf4220a3`. Matching owner receipts authorized exactly `@lubab/madar@0.40.0-beta.6`; [publication receipt 5157856602](https://github.com/mohanagy/madar/issues/631#issuecomment-5157856602) records protected merge `66b795e76a76c6946b85e5eb878e3f576b4e3dbb`, tree `ff57246a55e51459836946d6b5b9853d0cdcc372`, and release workflow 30746816714. The immutable artifact is 102 files / 155,257 packed / 653,996 unpacked bytes with shasum `4c98dd99cd321e741cabd689f0803d99e519f389` and tarball SHA-256 `12d8abe1ac3d0945c654f4df2582ac1de63f2aeee55d82d4bf5b053d92036074`. -## In progress — beta.6 publication pending before no-fallback qualification #631 +## In progress — beta.6 manual qualification failed; focused corrective #631 -[#631](https://github.com/mohanagy/madar/issues/631) remains in progress. Beta.6 publication enables the fixed installed-package test; it is not a qualification result. The frozen comparison against `0.32.0`, `0.40.0-beta.4`, one pinned Graphify commit, and a no-tool control has not started. Provider traffic or spend, stable/`latest`, GitHub Release, Registry publication, tag, comparative claims, and `main` remain unauthorized. +[#631](https://github.com/mohanagy/madar/issues/631) remains in progress. The installed beta.6 exact prompt returned incomplete at 6/7 and its natural Claude session used repository fallback, so beta.6 did not qualify. The focused terminal-language corrective is unpublished; even after its local exact-prompt gate passes, the frozen ten-stage comparison against `0.32.0`, `0.40.0-beta.4`, one pinned Graphify commit, and a no-tool control remains pending. Provider traffic or spend, npm publication, stable/`latest`, GitHub Release, Registry publication, tag, comparative claims, and `main` remain unauthorized. ## Validation — release decision diff --git a/src/domain/query/plan.ts b/src/domain/query/plan.ts index 6bb8a434..014e7027 100644 --- a/src/domain/query/plan.ts +++ b/src/domain/query/plan.ts @@ -21,21 +21,21 @@ const BEHAVIOR = new Set( ) const IRREGULAR = new Map('built=build generation=generate got=get getting=get persistence=persist planned=plan planning=plan ran=run running=run setting=set written=write wrote=write'.split(' ').map((pair) => pair.split('=') as [string, string])) -function canonical(value: string): string { - const mapped = IRREGULAR.get(value) - if (mapped) return mapped - const ing = value.endsWith('ing') ? value.slice(0, -3) : '' - const past = value.endsWith('ed') ? value.slice(0, -2) : '' - const forms = [value, - /i(?:es|ed)$/u.test(value) ? `${value.slice(0, -3)}y` : '', +function canon(v: string): string { + const m = IRREGULAR.get(v) + if (m) return m + const ing = v.endsWith('ing') ? v.slice(0, -3) : '' + const past = v.endsWith('ed') ? v.slice(0, -2) : '' + const f = [v, + /i(?:es|ed)$/u.test(v) ? `${v.slice(0, -3)}y` : '', ing, ing ? `${ing}e` : '', past, past ? `${past}e` : '', - value.endsWith('es') ? value.slice(0, -2) : '', - value.endsWith('s') ? value.slice(0, -1) : ''] - const action = forms.find((candidate) => ACTIONS.has(candidate)) - if (action) return action - if (value.length <= 4) return value - if (value.endsWith('ies')) return `${value.slice(0, -3)}y` - return /(? ACTIONS.has(x)) + if (a) return a + if (v.length <= 4) return v + if (v.endsWith('ies')) return `${v.slice(0, -3)}y` + return /(? { - const value = lexicalTokens(rule.exec(text)?.[1] ?? '') - .filter((token) => !COMMON.has(token)).join(' ') + const read = (r: RegExp): string | undefined => { + const value = lexicalTokens(r.exec(text)?.[1] ?? '').filter((token) => !COMMON.has(token)).join(' ') return value || undefined } const walked = /^walk (?:me )?through\b/u.test(text) @@ -160,11 +159,11 @@ function flowBounds(text: string): FlowBounds { ?? read(/\bfrom .+?\bthrough (?!to\b)(.+?)(?= to\b| how\b|$)/u) ?? (walked ? undefined : read(/\bthrough (?!to\b)(.+?)(?= to\b| how\b|$)/u)), - terminal: read(/(? match[1]!), - ident = /\bwhere\s+(?:is|are|was|were)\s+[`'"]?([\p{L}_$][\p{L}\p{N}_$.-]*)[`'"]?\s+(?:defined|declared|implemented)\b/iu + id = /\bwhere\s+(?:is|are|was|were)\s+[`'"]?([\p{L}_$][\p{L}\p{N}_$.-]*)[`'"]?\s+(?:defined|declared|implemented)\b/iu .exec(raw)?.[1], - ownerQuery = RegExp(`\\b(?:which|what) (?:${OWNER}) (?:${LW})\\b`).test(text) + owner = RegExp(`\\b(?:which|what) (?:${OWNER}) (?:${LW})\\b`).test(text) const mode: QueryIntent | undefined = - ownerQuery ? 'locate' - : /\b(?:end to end|what happen when)\b|\bfrom\b.+\b(?:through|via)\b.+\bto\b|\btrace\b.+\bfrom\b.+\bto\b/.test(text) + owner ? 'locate' + : /^where (?:is|are|was|were) .+ (?:flow|workflow|pipeline) orchestrated list (?:the )?(?:flow|workflow|pipeline) stage and (?:the )?entrypoint (?:service|handler|worker)$/u.test(text) + || /\b(?:end to end|what happen when)\b|\bfrom\b.+\b(?:through|via)\b.+\bto\b|\btrace\b.+\bfrom\b.+\bto\b/.test(text) || /^follow /.test(text) || /^which .+\b(?:save|write)\b/.test(text) || /\bhow\b[\s\S]*\bgenerat(?:e|ed|es|ing)\b/iu.test(raw) @@ -213,26 +213,26 @@ export function planQuestion(request: NormalizedRetrieveRequest): QuestionPlanRe terms: [...new Set(tokens.filter((token) => !COMMON.has(token)))].sort(), } } - const coordinated = mode === 'workflow' ? coordinatedFlow(text) : undefined - const [topic, ignored] = mode === 'workflow' - ? coordinated ? [coordinated.subject, []] : flowSubject(text) - : [names[0] - ? content(names[0], mode, true).join(' ') - : mode === 'locate' && ident - ? content(ident, 'locate', true).join(' ') - : simpleSubject(text, mode), []] - const span: FlowBounds = coordinated - ?? (mode === 'workflow' ? flowBounds(text) : {}) - if (mode === 'workflow' && names.length) { - span.stage = names.flatMap(lexicalTokens).join(' ') + const coord = mode === 'workflow' ? flow(text) : undefined + const [subj, omit] = mode === 'workflow' + ? coord ? [coord.subject, []] : subject(text) + : [refs[0] + ? content(refs[0], mode, true).join(' ') + : mode === 'locate' && id + ? content(id, 'locate', true).join(' ') + : simple(text, mode), []] + const span: FlowBounds = coord ?? (mode === 'workflow' + ? bounds(text, /(?:^|\s)to\s+(?:(?:a|an|the|its)\s+)?(?:finished|done)\s+report\s*[.?!]*$/iu.test(raw)) : {}) + if (mode === 'workflow' && refs.length) { + span.stage = refs.flatMap(lexicalTokens).join(' ') } - const skip = new Set(ignored) - const terms = new Set((coordinated?.terms ?? tokens).filter((token) => + const skip = new Set(omit) + const keys = new Set((coord?.terms ?? tokens).filter((token) => !isNoise(token, mode) && !skip.has(token))) - lexicalTokens(topic).forEach((token) => terms.add(token)) - const sorted = [...terms].sort() - if (!topic || sorted.length === 0) { - return { status: 'unsupported', reason: 'missing_subject', terms: sorted } + lexicalTokens(subj).forEach((token) => keys.add(token)) + const list = [...keys].sort() + if (!subj || list.length === 0) { + return { status: 'unsupported', reason: 'missing_subject', terms: list } } const words = new Set(tokens) const access: LocateAccess | undefined = mode !== 'locate' ? undefined @@ -244,19 +244,19 @@ export function planQuestion(request: NormalizedRetrieveRequest): QuestionPlanRe : ['subject', 'entry', 'stage', 'handoff', 'behavior', 'ordering', 'terminal'] const rest = RegExp(`^(?:what (?:${FW})|how (?:is|are|was|were) .+ (?:${FW}))\\b`) .test(text) ? [] - : sorted.filter((token) => !lexicalTokens(topic).includes(token)) + : list.filter((token) => !lexicalTokens(subj).includes(token)) return { status: 'supported', plan: { - intent: mode, subject: topic, terms: sorted, + intent: mode, subject: subj, terms: list, obligations: kinds.map((kind, index): QueryObligation => ({ id: `o${index + 1}`, kind, - target: kind === 'entry' ? span.entry ?? topic - : kind === 'stage' ? span.stage ?? topic - : kind === 'handoff' ? span.handoff ?? topic - : kind === 'terminal' ? span.terminal ?? topic + target: kind === 'entry' ? span.entry ?? subj + : kind === 'stage' ? span.stage ?? subj + : kind === 'handoff' ? span.handoff ?? subj + : kind === 'terminal' ? span.terminal ?? subj : kind === 'behavior' && mode === 'explain' && rest.length - ? rest.join(' ') : topic, + ? rest.join(' ') : subj, mandatory: true, })), ...(access ? { access } : {}), diff --git a/tests/unit/benchmark-suite-isolation-docs.test.ts b/tests/unit/benchmark-suite-isolation-docs.test.ts index 8d4ebea8..730a7675 100644 --- a/tests/unit/benchmark-suite-isolation-docs.test.ts +++ b/tests/unit/benchmark-suite-isolation-docs.test.ts @@ -124,6 +124,7 @@ describe('development-only benchmark isolation', () => { expect(parity).toContain("result?.version !== 2") expect(parity).toContain("result?.state !== 'ready'") expect(parity).toContain('channelLinks.length !== 4') + expect(parity).toContain('terminal_language_corrective?.package_candidate') expect(parity).not.toContain('result?.outcome') expect(parity).not.toContain('serveGraphStdio') expect(parity).not.toContain('autoRefreshRequestWaitMs: 30_000') diff --git a/tests/unit/core-reset-governance.test.ts b/tests/unit/core-reset-governance.test.ts index cef28888..8f63c225 100644 --- a/tests/unit/core-reset-governance.test.ts +++ b/tests/unit/core-reset-governance.test.ts @@ -517,6 +517,14 @@ const BETA_6_PARENT_AUTHORIZATION = 'https://github.com/mohanagy/madar/issues/629#issuecomment-5157473448' const BETA_6_PREPARATION_ANCHOR = '68729161699b7592bea6984e1aa22c7b4b0833e8' const BETA_6_PREPARATION_TREE = '4500d416d0e890b1dc67c9228a2cbb49cf4220a3' +const BETA_6_RELEASE_MERGE = '66b795e76a76c6946b85e5eb878e3f576b4e3dbb' +const BETA_6_RELEASE_TREE = 'ff57246a55e51459836946d6b5b9853d0cdcc372' +const BETA_6_PUBLICATION = + 'https://github.com/mohanagy/madar/issues/631#issuecomment-5157856602' +const TERMINAL_LANGUAGE_BASE = BETA_6_RELEASE_MERGE +const TERMINAL_LANGUAGE_TREE = 'ff57246a55e51459836946d6b5b9853d0cdcc372' +const TERMINAL_LANGUAGE_AUTHORIZATION = + 'https://github.com/mohanagy/madar/issues/631#issuecomment-5158293324' const BETA_6_PACKAGE = { npm_files: 102, npm_packed_bytes: 155_257, @@ -526,6 +534,15 @@ const BETA_6_PACKAGE = { 'sha512-o6L/BiJ1wrTWCaK537p60pGUC5i8zY0Zqz7NqD1zW4fJl/ewjF3cgysf4dbOkY4y49DkYDTG2qoUh1DGvq2Q0Q==', npm_artifact_sha256: '12d8abe1ac3d0945c654f4df2582ac1de63f2aeee55d82d4bf5b053d92036074', } as const +const TERMINAL_LANGUAGE_PACKAGE = { + npm_files: 102, + npm_packed_bytes: 155_330, + npm_unpacked_bytes: 654_008, + npm_shasum: 'c107e87c185c39e9acc0d3a33d55e4bbe2e8eb30', + npm_integrity: + 'sha512-/is0gABnCpimVQWLdvyFBtqhhrwSkuwgYtzQIp8FDBcSqAoLqXK4E5C3CTHqLxIWWKAtNUx8o90B7TOtMb9VCg==', + npm_artifact_sha256: 'f341a2b3e36d074b7cdad2656bb4895393b82894223489778dad7ac623069621', +} as const const NO_FALLBACK_CORRECTIVE_AUTHORIZATION = 'https://github.com/mohanagy/madar/issues/631#issuecomment-5157008370' const NO_FALLBACK_CORRECTIVE_PARENT = @@ -965,8 +982,8 @@ describe('core reset governance', () => { expect(roadmap).toContain('## Completed — semantic execution index #632') expect(roadmap).toContain('## Completed — obligation-driven retrieval #630') expect(roadmap).toContain('## Published manual-test candidate — `0.40.0-beta.5`') - expect(roadmap).toContain('## Authorized corrective manual-test candidate — `0.40.0-beta.6`') - expect(roadmap).toContain('## In progress — beta.6 publication pending before no-fallback qualification #631') + expect(roadmap).toContain('## Published corrective manual-test candidate — `0.40.0-beta.6`') + expect(roadmap).toContain('## In progress — beta.6 manual qualification failed; focused corrective #631') expect(roadmap).toContain(CAPABILITY_VALIDATION_PROPOSAL_SHA256) expect(roadmap).toContain(CAPABILITY_VALIDATION_OWNER_APPROVAL) expect(roadmap).toContain(CAPABILITY_VALIDATION_RFC_APPROVAL) @@ -1166,10 +1183,10 @@ describe('core reset governance', () => { expect(scorecard).toContain('| Capability validation v2 | **Stopped / not planned**') expect(scorecard).toContain('| Retrieval regression #618 | **Passed**') expect(scorecard).toContain('| Retrieval regression #625 | **Passed**') - expect(scorecard).toContain('| Beta release | **Beta.5 published / beta.6 authorized**') + expect(scorecard).toContain('| Beta release | **Beta.5 and beta.6 published**') expect(scorecard).toContain('| Semantic execution index #632 | **Passed**') expect(scorecard).toContain('| Obligation-driven retrieval #630 | **Passed**') - expect(scorecard).toContain('| No-fallback qualification #631 | **In progress — beta.6 publication pending**') + expect(scorecard).toContain('| No-fallback qualification #631 | **In progress — beta.6 manual gate failed**') expect(scorecard).toContain(CAPABILITY_VALIDATION_PROPOSAL_SHA256) expect(scorecard).toContain(CAPABILITY_VALIDATION_OWNER_APPROVAL) expect(scorecard).toContain(CAPABILITY_VALIDATION_RFC_APPROVAL) @@ -1215,7 +1232,7 @@ describe('core reset governance', () => { expect(scorecard).toContain('every warmup/measured result must remain correct; an empty positive result fails') expect(scorecard).toContain('| Retrieval regression #622 | **Passed**') expect(scorecard).toContain('Issues `#622`, `#625`, `#632`, and `#630` are complete on `next`') - expect(scorecard).toContain('beta.6 publication, owner testing, and later formal qualification') + expect(scorecard).toContain('focused unpublished corrective before later formal qualification') expect(scorecard).toContain(OBLIGATION_RETRIEVAL_MERGE) expect(scorecard).toContain('1,424 source LOC / 60,933 emitted bytes') expect(scorecard).toContain( @@ -1517,9 +1534,9 @@ describe('core reset governance', () => { base_commit: OBLIGATION_RETRIEVAL_BASE, completed_phase_commit: OBLIGATION_RETRIEVAL_MERGE, ...OBLIGATION_RETRIEVAL_SOURCE, - ...BETA_6_PACKAGE, + ...TERMINAL_LANGUAGE_PACKAGE, measurement_state: 'source_and_package_exact', - snapshot_scope: 'no_fallback_corrective_beta6_manual_test_package_candidate', + snapshot_scope: 'terminal_language_corrective_unpublished_candidate', }) expect(manifest.current.release_candidate).toMatchObject({ version: '0.40.0-beta.4', @@ -1571,8 +1588,15 @@ describe('core reset governance', () => { parent_authorization_receipt: BETA_6_PARENT_AUTHORIZATION, target_branch: 'next', npm_dist_tag: 'next', - publication_state: 'authorized_pending_protected_next_release_merge', - qualification_state: 'fixed_package_publication_pending_formal_631_gate_pending', + publication_state: 'published_from_protected_next', + publication_receipt: BETA_6_PUBLICATION, + release_merge: BETA_6_RELEASE_MERGE, + release_tree: BETA_6_RELEASE_TREE, + trusted_publishing_run: 'https://github.com/mohanagy/madar/actions/runs/30746816714', + published_at: '2026-08-02T12:28:22Z', + qualification_state: 'owner_manual_test_failed_terminal_language_and_zero_fallback_formal_631_gate_pending', + manual_failure_receipt: TERMINAL_LANGUAGE_AUTHORIZATION, + frozen_graph_sha256: '1d4d10ff6e2ceac5291779303d791ac266118b299f5c4c314614076b1661707f', package_candidate: BETA_6_PACKAGE, stable_or_latest: 'forbidden', github_release: 'forbidden', @@ -2479,7 +2503,7 @@ describe('core reset governance', () => { constraints: { dependency_state: `satisfied_by_${OBLIGATION_RETRIEVAL_MERGE}`, beta_publication: 'authorized_exact_0.40.0-beta.5_by_receipt_5155128419', - corrective_beta_publication: 'authorized_exact_0.40.0-beta.6_by_receipt_5157473339', + corrective_beta_publication: 'published_exact_0.40.0-beta.6_by_receipt_5157856602', stable_or_latest_publication: 'forbidden', github_release: 'forbidden', registry_metadata_publication: 'forbidden', @@ -2506,6 +2530,42 @@ describe('core reset governance', () => { replacement_measurement: { source_loc: 1_424, emitted_bytes: 60_983 }, package_candidate: NO_FALLBACK_CORRECTIVE_PACKAGE, }, + terminal_language_corrective: { + status: 'local_candidate', + authorization_receipt: TERMINAL_LANGUAGE_AUTHORIZATION, + protected_base: TERMINAL_LANGUAGE_BASE, + protected_base_tree: TERMINAL_LANGUAGE_TREE, + target_branch: 'next', + modified_sources: ['src/domain/query/plan.ts'], + test_sources: [ + 'tests/unit/query-plan.test.ts', + 'tests/unit/retrieve-v2-contract-gaps.test.ts', + ], + production_loc_change: 0, + production_loc_budget: { added_max: 68, removed_min: 68, net_max: 0 }, + source_measurement: { + production_typescript_files: 44, + production_typescript_loc: 15_871, + added: 68, + removed: 68, + net: 0, + diff_sha256: '2a95f969db7c41bc5882ed1b252029150b0f6e4e9c407a0a37bc50bfbc03f201', + }, + replacement_measurement: { source_loc: 1_424, emitted_bytes: 60_995 }, + package_candidate: { + ...TERMINAL_LANGUAGE_PACKAGE, + parity_state: 'passed', + }, + frozen_graph: { + sha256: '1d4d10ff6e2ceac5291779303d791ac266118b299f5c4c314614076b1661707f', + exact_prompt_state: 'ready', + required_obligations: 7, + proven_obligations: 7, + selected_files: 9, + authenticated_excerpts: 12, + causal_hops: 20, + }, + }, corrective_release: { version: '0.40.0-beta.6', preparation_anchor_commit: BETA_6_PREPARATION_ANCHOR, @@ -2514,7 +2574,14 @@ describe('core reset governance', () => { parent_authorization_receipt: BETA_6_PARENT_AUTHORIZATION, target_branch: 'next', npm_dist_tag: 'next', - publication_state: 'authorized_pending_protected_next_release_merge', + publication_state: 'published_from_protected_next', + publication_receipt: BETA_6_PUBLICATION, + release_merge: BETA_6_RELEASE_MERGE, + release_tree: BETA_6_RELEASE_TREE, + trusted_publishing_run: 'https://github.com/mohanagy/madar/actions/runs/30746816714', + published_at: '2026-08-02T12:28:22Z', + qualification_state: 'owner_manual_test_failed_terminal_language_and_zero_fallback_formal_631_gate_pending', + manual_failure_receipt: TERMINAL_LANGUAGE_AUTHORIZATION, package_candidate: BETA_6_PACKAGE, stable_or_latest: 'forbidden', github_release: 'forbidden', @@ -2526,13 +2593,15 @@ describe('core reset governance', () => { expect(noFallbackQualification.corrective.constraints.publication).toBe('forbidden') const correctiveSources = execFileSync( git, - ['diff', '--name-only', BETA_5_RELEASE_MERGE, '--', 'src'], + ['diff', '--name-only', BETA_5_RELEASE_MERGE, BETA_6_PREPARATION_ANCHOR, + '--', 'src'], { encoding: 'utf8' }, ).trim().split('\n').filter(Boolean).sort() expect(correctiveSources).toEqual([...NO_FALLBACK_CORRECTIVE_SOURCES].sort()) const correctiveEvaluatorSources = execFileSync( git, - ['diff', '--name-only', BETA_5_RELEASE_MERGE, '--', 'tools/eval/lib'], + ['diff', '--name-only', BETA_5_RELEASE_MERGE, BETA_6_PREPARATION_ANCHOR, + '--', 'tools/eval/lib'], { encoding: 'utf8' }, ).trim().split('\n').filter(Boolean).sort() expect(correctiveEvaluatorSources).toEqual(['tools/eval/lib/infrastructure/compare.ts']) @@ -2550,9 +2619,16 @@ describe('core reset governance', () => { )).not.toThrow() expect(createHash('sha256').update(execFileSync( git, - ['diff', '--binary', '--full-index', BETA_5_RELEASE_MERGE, '--', + ['diff', '--binary', '--full-index', BETA_5_RELEASE_MERGE, + BETA_6_PREPARATION_ANCHOR, '--', ...NO_FALLBACK_CORRECTIVE_SOURCES], )).digest('hex')).toBe(NO_FALLBACK_CORRECTIVE_DIFF_SHA256) + const terminalLanguageSources = execFileSync( + git, + ['diff', '--name-only', TERMINAL_LANGUAGE_BASE, '--', 'src'], + { encoding: 'utf8' }, + ).trim().split('\n').filter(Boolean) + expect(terminalLanguageSources).toEqual(['src/domain/query/plan.ts']) const changedEvidenceSkeletonProduction = execFileSync( git, [ @@ -2980,7 +3056,7 @@ describe('core reset governance', () => { completed_phase_commit: OBLIGATION_RETRIEVAL_MERGE, ...OBLIGATION_RETRIEVAL_SOURCE, measurement_state: 'source_and_package_exact', - snapshot_scope: 'no_fallback_corrective_beta6_manual_test_package_candidate', + snapshot_scope: 'terminal_language_corrective_unpublished_candidate', }) expect(manifest.items.filter((item) => item.status === 'in_progress').map((item) => item.id)) .toEqual([NO_FALLBACK_QUALIFICATION_ID]) @@ -3842,9 +3918,9 @@ describe('core reset governance', () => { base_commit: OBLIGATION_RETRIEVAL_BASE, completed_phase_commit: OBLIGATION_RETRIEVAL_MERGE, ...OBLIGATION_RETRIEVAL_SOURCE, - npm_files: BETA_6_PACKAGE.npm_files, - npm_packed_bytes: BETA_6_PACKAGE.npm_packed_bytes, - npm_unpacked_bytes: BETA_6_PACKAGE.npm_unpacked_bytes, + npm_files: TERMINAL_LANGUAGE_PACKAGE.npm_files, + npm_packed_bytes: TERMINAL_LANGUAGE_PACKAGE.npm_packed_bytes, + npm_unpacked_bytes: TERMINAL_LANGUAGE_PACKAGE.npm_unpacked_bytes, }) expect(manifest.items.filter((item) => item.status === 'in_progress').map((item) => item.id)) .toEqual([NO_FALLBACK_QUALIFICATION_ID]) @@ -5242,11 +5318,11 @@ describe('core reset governance', () => { base_commit: OBLIGATION_RETRIEVAL_BASE, completed_phase_commit: OBLIGATION_RETRIEVAL_MERGE, ...OBLIGATION_RETRIEVAL_SOURCE, - npm_files: BETA_6_PACKAGE.npm_files, - npm_packed_bytes: BETA_6_PACKAGE.npm_packed_bytes, - npm_unpacked_bytes: BETA_6_PACKAGE.npm_unpacked_bytes, + npm_files: TERMINAL_LANGUAGE_PACKAGE.npm_files, + npm_packed_bytes: TERMINAL_LANGUAGE_PACKAGE.npm_packed_bytes, + npm_unpacked_bytes: TERMINAL_LANGUAGE_PACKAGE.npm_unpacked_bytes, measurement_state: 'source_and_package_exact', - snapshot_scope: 'no_fallback_corrective_beta6_manual_test_package_candidate', + snapshot_scope: 'terminal_language_corrective_unpublished_candidate', }) expect(manifest.items.filter((item) => item.status === 'in_progress').map((item) => item.id)) .toEqual([NO_FALLBACK_QUALIFICATION_ID]) @@ -6407,6 +6483,19 @@ describe('core reset governance', () => { diff_sha256: string } } + terminal_language_corrective?: { + protected_base: string + modified_sources: string[] + production_loc_budget: { added_max: number; removed_min: number; net_max: number } + source_measurement: { + production_typescript_files: number + production_typescript_loc: number + added: number + removed: number + net: number + diff_sha256: string + } + } candidate_source?: { production_typescript_files: number production_typescript_loc: number @@ -6419,7 +6508,8 @@ describe('core reset governance', () => { const { current } = manifest const activePhase = manifest.items.find((item) => item.id === current.active_phase) const completedPhase = manifest.items.find((item) => item.id === current.completed_phase) - const corrective = activePhase?.corrective + const corrective = activePhase?.terminal_language_corrective + ?? activePhase?.corrective if (corrective) { const baseline = corrective.protected_base expect(execFileSync(git, ['cat-file', '-t', `${baseline}^{commit}`], { @@ -6873,8 +6963,8 @@ describe('core reset governance', () => { expect(governance).toContain('## Completed — semantic execution index #632') expect(governance).toContain('## Completed — obligation-driven retrieval #630') expect(governance).toContain('## Published manual-test candidate — `0.40.0-beta.5`') - expect(governance).toContain('## Authorized corrective manual-test candidate — `0.40.0-beta.6`') - expect(governance).toContain('## In progress — beta.6 publication pending before no-fallback qualification #631') + expect(governance).toContain('## Published corrective manual-test candidate — `0.40.0-beta.6`') + expect(governance).toContain('## In progress — beta.6 manual qualification failed; focused corrective #631') expect(governance).toContain('## Stopped amendment — capability validation v1') expect(governance).toContain('## Historical accepted amendment — capability validation v2') expect(governance).toContain('## Cancelled amendment — capability validation') diff --git a/tests/unit/query-plan.test.ts b/tests/unit/query-plan.test.ts index e5c03a6f..df60e437 100644 --- a/tests/unit/query-plan.test.ts +++ b/tests/unit/query-plan.test.ts @@ -358,6 +358,20 @@ describe('planQuestion', () => { .toBe('report') }) + it('normalizes the exact client finished-report workflow question', () => { + const result = plan( + 'How does generating the report for an idea work? Explain the end-to-end pipeline flow from request to finished report.', + ) + + expect(result.intent).toBe('workflow') + expect(result.subject).toBe('report idea') + expect(result.obligations.map(({ kind }) => kind)).toEqual([ + 'subject', 'entry', 'stage', 'handoff', 'behavior', 'ordering', 'terminal', + ]) + expect(result.obligations.find(({ kind }) => kind === 'terminal')?.target) + .toBe('report') + }) + it.each([ 'a saved report', 'its saved report', @@ -372,7 +386,44 @@ describe('planQuestion', () => { }) it.each([ + 'finished', + 'done', + ])('normalizes the complete %s-report terminal', (state) => { + const canonical = plan( + 'How does generating the idea report work end to end from the generate request through the pipeline to the report', + ) + const result = plan( + `How does generating the idea report work end to end from the generate request through the pipeline to the ${state} report`, + ) + + expect(result.intent).toBe(canonical.intent) + expect(result.subject).toBe(canonical.subject) + expect(result.obligations).toEqual(canonical.obligations) + }) + + it.each([ + ['final report', 'report'], + ['completed report', 'report'], + ['saved report', 'report'], + ['store report', 'store report'], + ['persist report', 'persist report'], + ])('preserves the established complete terminal behavior: %s', (terminal, expected) => { + const result = plan( + `Trace the request from HTTP through the pipeline to ${terminal}`, + ) + + expect(result.obligations.find(({ kind }) => kind === 'terminal')?.target) + .toBe(expected) + }) + + it.each([ + ['final settlement', 'settlement'], + ['completed transaction', 'transaction'], + ['finished goods', 'finished good'], + ['done callback', 'done callback'], + ['saved query', 'save query'], ['stored procedure', 'store procedure'], + ['persisted snapshot', 'persist snapshot'], ['store credit', 'store credit'], ['write concern', 'write concern'], ])('preserves a compound workflow terminal: %s', (terminal, expected) => { @@ -384,6 +435,73 @@ describe('planQuestion', () => { .toBe(expected) }) + it.each([ + ['finished report archive', 'finished report archive'], + ['done report callback', 'done report callback'], + ['save report query', 'save report query'], + ['store report procedure', 'store report procedure'], + ['persist report snapshot', 'persist report snapshot'], + ])('does not collapse a compound report terminal: %s', (terminal, expected) => { + const result = plan( + `Trace the request from HTTP through the pipeline to ${terminal}`, + ) + + expect(result.obligations.find(({ kind }) => kind === 'terminal')?.target) + .toBe(expected) + }) + + it.each([ + ['Where is the route to FinishedReport implemented?', 'locate'], + ['Where is the mapping to DoneReport defined?', 'locate'], + ['Which service reads the path to SavedReport?', 'locate'], + ['How does the adapter map input to FinishedReport?', 'explain'], + ] as const)('preserves non-workflow report identifiers: %s', (question, intent) => { + const result = plan(question) + + expect(result.intent).toBe(intent) + expect(result.terms).toContain(question.includes('Done') ? 'done' + : question.includes('Saved') ? 'save' : 'finished') + }) + + it.each([ + ['FinishedReport', 'finished report'], + ['DoneReport', 'done report'], + ['`FinishedReport`', 'finished report'], + ['`DoneReport`', 'done report'], + ['"finished report"', 'finished report'], + ['"done report"', 'done report'], + ])('preserves an explicit workflow terminal identifier: %s', (terminal, expected) => { + const result = plan( + `Trace the request from HTTP through the pipeline to ${terminal}`, + ) + + expect(result.obligations.find(({ kind }) => kind === 'terminal')?.target) + .toBe(expected) + }) + + it('keeps the observed compound recovery question in workflow planning', () => { + const result = plan( + 'Where is the idea report generation pipeline orchestrated? List the pipeline stages and the entrypoint service.', + ) + + expect(result.intent).toBe('workflow') + expect(result.subject).toBe('idea report') + expect(result.obligations.map(({ kind }) => kind)).toEqual([ + 'subject', 'entry', 'stage', 'handoff', 'behavior', 'ordering', 'terminal', + ]) + expect(result.obligations).toHaveLength(7) + expect(result.obligations.every(({ mandatory }) => mandatory)).toBe(true) + }) + + it.each([ + 'Where is allowlist stage entrypoint defined?', + 'Where is blacklist stage entrypoint implemented?', + 'Where is ReportPipeline defined? List its stages and entrypoint service.', + 'Where is FinishedReport defined? List test stages and entrypoint examples.', + ])('keeps locator precedence outside the observed recovery wording: %s', (question) => { + expect(plan(question).intent).toBe('locate') + }) + it('extracts the workflow object from event phrasing', () => { const result = plan('What happens when a user requests an idea report?') diff --git a/tests/unit/retrieve-v2-contract-gaps.test.ts b/tests/unit/retrieve-v2-contract-gaps.test.ts index fbefa85c..e3021f08 100644 --- a/tests/unit/retrieve-v2-contract-gaps.test.ts +++ b/tests/unit/retrieve-v2-contract-gaps.test.ts @@ -93,6 +93,12 @@ const frozenQueries = (JSON.parse(readFileSync( distant_paraphrases: string[] field_incident_variants: string[] } }).queries +const issue631Queries = [ + 'explain how generating the report for an idea is working ?', + ...['finished', 'done', 'final', 'completed', 'saved', 'stored', 'persisted'] + .map((state) => `How does generating the report for an idea work? Explain the end-to-end pipeline flow from request to ${state} report.`), + 'Where is the idea report generation pipeline orchestrated? List the pipeline stages and the entrypoint service.', +] beforeAll(() => { const root = mkdtempSync(join(tmpdir(), 'madar-630-real-flow-')) @@ -294,18 +300,27 @@ describe('retrieve v2 uncovered contract cases', () => { ...frozenQueries.clause_order_variants, ...frozenQueries.distant_paraphrases, ...frozenQueries.field_incident_variants, + ...issue631Queries, ])('converges the frozen broad prompt: %s', (question) => { const baseline = retrieveContext(reportFlow, { question: frozenQueries.beta_3_broad, budget: 4_000, }) expect(baseline.state).toBe('ready') + expect(baseline.metrics).toMatchObject({ + required_obligations: 7, + proven_obligations: 7, + }) if (baseline.state !== 'ready') return const result = retrieveContext(reportFlow, { question, budget: 4_000 }) const detail = result.state === 'incomplete' ? JSON.stringify(result.missing) : result.state expect(result.state, detail).toBe('ready') + expect(result.metrics).toMatchObject({ + required_obligations: 7, + proven_obligations: 7, + }) if (result.state !== 'ready') return expect(result.dossier.flow).toEqual(baseline.dossier.flow) expect(result.dossier.evidence).toEqual(baseline.dossier.evidence) diff --git a/tools/eval/core-reset/verify-isolation.mjs b/tools/eval/core-reset/verify-isolation.mjs index de3563ff..1504b840 100644 --- a/tools/eval/core-reset/verify-isolation.mjs +++ b/tools/eval/core-reset/verify-isolation.mjs @@ -71,7 +71,8 @@ const obligationRetrieval = manifest.items?.find( (item) => item.id === "obligation-driven-retrieval-630", ) const packageBudget = activePhase?.npm_package_budget ?? evaluationPackageBudget -const replacementReceipt = activePhase?.corrective?.replacement_measurement +const replacementReceipt = activePhase?.terminal_language_corrective?.replacement_measurement + ?? activePhase?.corrective?.replacement_measurement ?? obligationRetrieval?.candidate?.replacement_measurement function assert(condition, message) {