fix(catalog): debug.generated_at is response time, not cached index timestamp#125
Merged
Merged
Conversation
…imestamp runCatalog returned index.generated_at as debug.generated_at — the cached index build timestamp, not the current response time. Every other handler uses new Date().toISOString() for this field. Observed during v0.21.0 regression testing: debug.generated_at lagged server_time by 48 minutes in a single response envelope. Changes: - workers/src/orchestrate.ts: runCatalog now sets debug.generated_at to new Date().toISOString(). Cached index build timestamp preserved as debug.index_built_at for consumers wanting the freshness signal. - workers/test/canon-tool-envelope.smoke.mjs: add oddkit_catalog coverage. Bug slipped because catalog had no smoke assertion. Canon references: - klappy://canon/values/axioms (Axiom 1 — Reality Is Sovereign) - klappy://canon/principles/consistency-same-pattern-every-time - klappy://canon/principles/cache-fetches-and-parses (PR #125)
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
oddkit | 4ce5d1a | Commit Preview URL Branch Preview URL |
Apr 20 2026, 12:28 PM |
klappy
pushed a commit
that referenced
this pull request
Apr 20, 2026
Bumps version in package.json, workers/package.json, and both lockfiles. Fills CHANGELOG [Unreleased] with 0.22.0 entries covering PR #124 (telemetry_public envelope conformance) and PR #125 (catalog debug.generated_at response time + new index_built_at field). MINOR bump: both fixes add envelope fields consumers can rely on. Both bugs caught during the v0.21.1 regression test sweep. Pre-commit hook verified version sync and typecheck pass. No code or test changes in this PR — documentation + version only.
This was referenced Apr 20, 2026
klappy
added a commit
that referenced
this pull request
Apr 20, 2026
Main shipped 0.22.0 via PR #128 while this branch was in Sonnet 4.6 validator dispatch. PR #128 backfilled CHANGELOG + version bump covering the envelope-conformance fixes from PR #124 (telemetry_public) and PR #125 (catalog generated_at). Per klappy://canon/constraints/release-validation-gate Rule 3 (canon outranks session artifacts), this refactor is re-versioned to 0.23.0. The handoff's "ship as 0.22.0" recommendation was session-scoped; main- reality is the canon. Resolution: - CHANGELOG.md: my encode D5+D9 content moves to a new [0.23.0] section above the existing [0.22.0] (telemetry + catalog); added a version- note blockquote explaining the bump. - package.json / workers/package.json / both lockfiles: 0.22.0 → 0.23.0. - workers/src/orchestrate.ts: auto-merged cleanly (catalog fix touched runCatalog, encode refactor touched discoverEncodingTypes + classifier call sites; zero overlap). - workers/test/canon-tool-envelope.smoke.mjs: auto-merged cleanly (additive on both sides). Verified: - tsc --noEmit clean - governance-parser.test.mjs 105/105 pass - CHANGELOG structure: [Unreleased] [0.23.0] [0.22.0] [0.21.1] [0.21.0]... - All conflict markers removed Sonnet 4.6 validator verdict (session sesn_011CaF5vqjgzN7Mw8s84qvK9, PASS on all 5 corroborations) remains valid for the encode refactor content — the rebase does not touch any matcher code or action behavior. A fresh-context validator re-dispatch will run before promotion per release-validation-gate Rule 2 out of canon-discipline caution.
klappy
added a commit
that referenced
this pull request
Apr 20, 2026
…23.0) (#126) Migrates oddkit_encode's trigger-word classifier from regex alternation to stemmed phrase-subset matching — the last regex matcher in the canon-parity sweep. Closes the sweep. Originally scoped as 0.22.0 per the P1.3.4 handoff. While this branch was in Sonnet 4.6 validator dispatch, PR #124 (telemetry envelope) and PR #125 (catalog envelope) landed on main and were released as 0.22.0 via PR #128. Per klappy://canon/constraints/release-validation-gate Rule 3 (canon outranks session artifacts), this refactor rebases forward and ships as 0.23.0. Bugbot disposition (Rule 1): - 259170a (first cut, flat stemmedTokens): completed/neutral, high-severity finding on multi-word vocab flattening → fix-forwarded via 113ba11 - 113ba11 (Cursor autofix stemmedPhrases): completed/neutral, low-severity dead-code finding on intersectsStems → fix-forwarded via e404fe0 - e404fe0: completed/success - eaa1234 (CHANGELOG + assertion 16): completed/success - d2acf91 (merge origin/main): Bugbot cancelled (new commit pushed before completion) - 8a0636b (stale-comment fix): completed/success — final head Sonnet 4.6 validator (Rule 2): agent_011CaF5vo8B5UpqtfZAmSeui, session sesn_011CaF5vqjgzN7Mw8s84qvK9 — verdict PASS on all 5 corroborations against eaa1234. Rebase and comment-fix commits on top are textual/version-only and do not touch matcher code. A fresh validator dispatch will run against the main→prod promotion PR per Rule 2. Refs: - Handoff: klappy://odd/handoffs/2026-04-20-p1-3-4-encode-canon-parity - Canon basis: klappy://canon/principles/cache-fetches-and-parses, klappy://canon/principles/vodka-architecture - Binding gate: klappy://canon/constraints/release-validation-gate Non-blocking carry-forward: P13 — Input-E fallback classification (inputs with no canon vocab intersection fall through to types[0] alphabetical = Constraint). Pre-existing behavior, flagged by validator, outside P1.3.4 scope.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gap
oddkit_catalogwas returningdebug.generated_atvalues that laggedserver_timeby minutes to hours. Observed on 2026-04-20: a catalog response haddebug.generated_at: 04:07:00whileserver_time: 04:55:05in the same envelope — 48 minutes stale.Root cause
workers/src/orchestrate.ts:1745inrunCatalogreturnedgenerated_at: index.generated_at— the cached index build timestamp — instead of the current response time. Every other handler in the file usesnew Date().toISOString()for this field.Fix
Two-field change in the
runCatalogdebug block:generated_at: new Date().toISOString()— consistent with every other handlerindex_built_at: index.generated_at— preserve the cache-freshness diagnostic under an accurate nameSmoke test
Bug slipped because
oddkit_cataloghad no coverage incanon-tool-envelope.smoke.mjs. This PR adds a block that:expectFullEnvelopedebug.generated_atage is under 60 secondsdebug.index_built_atis present as a separate fieldCanon references
generated_atmust represent that time)klappy://canon/principles/consistency-same-pattern-every-timeklappy://canon/principles/cache-fetches-and-parses(PR fix(catalog): debug.generated_at is response time, not cached index timestamp #125)Release-validation-gate
Do not merge until:
completedThis touches
orchestrate.tsenvelope behavior; the validator applies.Note
Low Risk
Low risk: small envelope/debug field adjustment in
oddkit_catalogplus a smoke test asserting timestamp semantics; main risk is minor downstream reliance on the old debug field meaning/name.Overview
Fixes
oddkit_catalogdebug timestamps sodebug.generated_atreflects response time (matching other handlers) instead of the cached index build time.Adds
debug.index_built_atto preserve the cached index timestamp for cache-freshness diagnostics, and extends the live envelope smoke test to coveroddkit_catalog, including recency checks forgenerated_atand presence ofindex_built_at.Reviewed by Cursor Bugbot for commit 4ce5d1a. Bugbot is set up for automated code reviews on this repo. Configure here.