Skip to content

promote: 0.27.0 to prod (Search-Corpus Boundary E0008.5 + result_grouping)#154

Merged
klappy merged 2 commits intoprodfrom
main
Apr 29, 2026
Merged

promote: 0.27.0 to prod (Search-Corpus Boundary E0008.5 + result_grouping)#154
klappy merged 2 commits intoprodfrom
main

Conversation

@klappy
Copy link
Copy Markdown
Owner

@klappy klappy commented Apr 29, 2026

Promote 0.27.0 to prod

Promotes main (1a1f093) to prod. Brings two PRs forward:

Pre-promotion gate (already cleared)

  • cloudflare-production.test.sh against https://main-oddkit.klappy.workers.dev: 41 passed, 0 failed
  • canon-tool-envelope.smoke.mjs against the same staging URL: 260 passed, 0 failed (12 new E0008.5 assertions all green)
  • ✅ Independent fresh-context Sonnet 4.6 read-only validator (release-validation-gate, tier 1): APPROVE_WITH_NOTES, full 9-question DOLCHE in #153 comment
  • ✅ Cursor Bugbot on feat(kb-scope): default-scope search corpus to overlay + required-baseline (E0008.5) #153: completed/success (one autofix landed and verified at 8e88a9f)
  • ✅ Typecheck: 0 errors
  • ✅ All CI checks on main HEAD: success

Behavior change consumers should know about

When knowledge_base_url is set, the search corpus now defaults to overlay + required-baseline only rather than overlay + the full baseline. Callers who want the prior behavior pass include_full_baseline: true to oddkit_search, oddkit_catalog, or oddkit_preflight. When knowledge_base_url is unset, behavior is unchanged.

Authority: klappy://canon/constraints/core-governance-baseline §"Search-Corpus Boundary" (klappy/klappy.dev #155, with framing refit in #156, both merged 2026-04-29).

Receipts (preview, just before this PR)

Probe Prod 0.26.0 main-oddkit 0.27.0 (default) main-oddkit 0.27.0 (include_full_baseline:true)
catalog overlay (ptxprint-mcp) 49 49 49
catalog baseline (ptxprint-mcp) 566 6 566
search index size 615 55 615
Klappy.dev's release-validation-gate in negative-control top hits yes absent

Why a PR vs. fast-forward push

scripts/promote.sh halts with "Manual resolution required" because historical promotions used PR-merge commits (visible in git log origin/main..origin/prod). The content of prod is exactly main's 428b676 ancestor — no real divergence — but the merge graph is non-fast-forward. Resolving in-pattern (PR-merge) keeps the audit trail consistent with the historical record.


Note

Medium Risk
Changes search/preflight ranking and default indexed corpus when knowledge_base_url is provided, which can alter returned results and downstream expectations. Telemetry schema also changes (blob9 repurposed), requiring consumers/queries to tolerate the new field.

Overview
Search & preflight now support result_grouping (merged/overlay_first/grouped) with a conditional default of overlay_first when knowledge_base_url/baseline override is set; in grouped mode responses also include split arrays (overlay_hits/baseline_hits, start_here_overlay/start_here_baseline). To avoid truncation bugs when grouping is enabled, both Worker and Node CLI widen the BM25 candidate pool (50) before partitioning and then cap returned results.

Introduces the E0008.5 Search-Corpus Boundary in the Worker: when knowledge_base_url is set, indexing/search/catalog/preflight default to overlay + a required-baseline allowlist (shipped as workers/baseline/MANIFEST.json), with include_full_baseline=true to opt back into the legacy merged corpus. Debug/envelopes surface the effective search_scope and baseline counts, telemetry records result_grouping in blob9, and tests are expanded to cover both behaviors; versions bump to 0.27.0.

Reviewed by Cursor Bugbot for commit 1a1f093. Bugbot is set up for automated code reviews on this repo. Configure here.

klappy added 2 commits April 28, 2026 16:37
…king when knowledge_base_url set (#152)

Closes #150.

When a project sets `knowledge_base_url`, oddkit_search and oddkit_preflight now default to overlay_first ranking — overlay (canon) docs surface above baseline docs in BM25 results, with score order preserved within each tier. Callers can override via the new `result_grouping: "merged" | "overlay_first" | "grouped"` parameter.

- Conditional default: knowledge_base_url unset → "merged" (no behavior change); set → "overlay_first".
- "grouped" mode adds explicit overlay_hits/baseline_hits arrays (search) and start_here_overlay/start_here_baseline (preflight) for callers that want to render tiers separately.
- Candidate-pool widening (50 BM25 candidates when grouping active, partition, slice to 5) ensures overlay docs at BM25 position 6+ are visible.
- Worker (workers/src/orchestrate.ts) and Node CLI (src/core/actions.js, src/tasks/preflight.js) at parity. Telemetry blob9 records caller-specified value.
- Validated by independent Sonnet 4.6 read-only dispatch per release-validation-gate Rule 2; Cursor Bugbot success per Rule 1.

Companion docs in klappy/klappy.dev#154.
…eline (E0008.5) (#153)

Implements canon klappy://canon/constraints/core-governance-baseline §Search-Corpus Boundary (klappy/klappy.dev #155 + #156).

When knowledge_base_url is set, the search corpus now defaults to overlay + required-baseline-only. Callers opt in to the legacy merged corpus via include_full_baseline: true. When knowledge_base_url is unset, the parameter is a no-op.

Affected: oddkit_search, oddkit_catalog, oddkit_preflight (and the unified oddkit action). Other tools unchanged — they read governance via the per-file resolver, not the search index.

RV-gate (klappy://canon/constraints/release-validation-gate, tier 1) cleared:
- Cursor Bugbot: completed/success (one autofix landed and verified, 8e88a9f)
- Independent Sonnet 4.6 read-only validator: APPROVE_WITH_NOTES (full DOLCHE in PR #153 comment)
- Smoke against preview URL: 260 passed, 0 failed
- Typecheck: 0 errors
- Workers Builds, Creed Freshness, Version Sync, Test CF Preview: all green

Version bump 0.26.0 → 0.27.0.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
oddkit 1a1f093 Commit Preview URL

Branch Preview URL
Apr 29 2026, 03:33 PM

@klappy klappy merged commit a73108d into prod Apr 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant