Skip to content

chore: Snowflake Cortex caching follow-ups (walk-back continuation, image-block probe, cross-process cooldown) #1023

Description

@anandgupta42

Consolidated follow-ups from the #1020 consensus code review and the v0.9.2 release review. Deferred because: each needs design or live verification beyond a quick fix.

  1. attachMarker walk-back: when the target block already has a marker, continue scanning earlier blocks/messages for an unmarked spot to preserve a second trailing breakpoint (MiMo/GLM-5.1 finding; rare in the shipped pipeline).
  2. Live-probe whether Cortex honors cache_control on image blocks; add a unit test for a newly-relocated marker landing on a non-text last block.
  3. Cache-disable cooldown (cacheDisabledUntil) is per-process; concurrent processes each pay the probe-retry tax independently on marker-rejecting accounts (Chaos Gremlin P1). Consider shared state only if such accounts are ever observed.
  4. Discussion: should a (non-SyntaxError) transform bug be able to fail a chat turn, or degrade to pass-through with a loud log (Tech Lead P2)?
  5. Dormant paths (src/plugin/snowflake-cortex.ts, packages/core cortexFetch PluginV2 port) lack the caching fix — port it if either is revived.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions