Skip to content

fix: bound Antigravity replay retention - #843

Closed
Ingwannu wants to merge 1 commit into
devfrom
agent/bound-antigravity-replay
Closed

Ingwannu wants to merge 1 commit into
devfrom
agent/bound-antigravity-replay

Conversation

@Ingwannu

@Ingwannu Ingwannu commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace raw model/session/function-argument cache keys with fixed-size SHA-256 identities
  • cap replay at 64 KiB per signature, 256 calls and 2 MiB per session, and 32 MiB globally
  • use call/session LRU eviction while keeping the existing one-hour TTL semantics
  • preserve prior valid mappings when an oversized replacement is ignored
  • sweep expired sessions at most once per minute outside budget pressure

Part of #820. This intentionally isolates the reproduced Antigravity retention problem from #829 app-wide memory infrastructure.

Verification

  • bun test tests/google-antigravity-replay.test.ts tests/google-antigravity-wire.test.ts (56 pass)
  • bun run typecheck
  • bun run privacy:scan

Compatibility

Normal sequential tool loops keep the newest 256 signed calls. In an extreme longer loop, an evicted old call may receive the existing upstream signature error rather than remaining in memory without a bound.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f3f1b482-92dc-4dd9-b6d9-99709a411a24

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@lidge-jun

Copy link
Copy Markdown
Owner

Thanks for this—it's a valuable, focused improvement. The byte-aware nested LRU bounds replace payload-sized replay keys and unbounded retention, and the substantial focused coverage gives this a solid foundation. The branch currently conflicts with dev, so it will need a rebase, followed by an independent review from someone other than the author, before it can land. We're tracking it under #820 for the next cycle.

@lidge-jun

Copy link
Copy Markdown
Owner

Superseded by #892, which implements this defect's fix natively on top of the wave-1 retained-state framework (the PR's shape was used as a reference; see the PR description in #892 for the defect-specific deltas, including where the framework already covered part of it). Thank you for the contribution — the analysis in this PR drove the fix.

@lidge-jun lidge-jun closed this Aug 2, 2026
olddonkey pushed a commit to olddonkey/opencodex that referenced this pull request Aug 2, 2026
Campaign preparation (docs-only): five units under devlog/_plan/260802_wtN_*
with 000 research + 010 implementation roadmaps, claim ledgers verified by a
lunasearch fan-out (Anthropic 1M windows, Copilot mixed-wire, DeepSeek
service_tier, WHATWG extension origins, POSIX rename-over-symlink).

wt1 update-path: PR lidge-jun#871, issue lidge-jun#879 (star-prompt deferral leakage), lidge-jun#557 optional
wt2 zero-leak: PRs lidge-jun#840 lidge-jun#841 lidge-jun#843 lidge-jun#844 lidge-jun#845 lidge-jun#847 (tracker lidge-jun#820)
wt3 provider-wire: PRs lidge-jun#746 lidge-jun#860 lidge-jun#839/lidge-jun#854, issue lidge-jun#875 triage, lidge-jun#616/lidge-jun#837 optional
wt4 server-config: PRs lidge-jun#850 (CORS origin confusion), lidge-jun#869 (symlink destruction)
wt5 windows-service: PRs lidge-jun#868, lidge-jun#861 (issue lidge-jun#848)
@Wibias
Wibias deleted the agent/bound-antigravity-replay branch August 8, 2026 01:49
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
Campaign preparation (docs-only): five units under devlog/_plan/260802_wtN_*
with 000 research + 010 implementation roadmaps, claim ledgers verified by a
lunasearch fan-out (Anthropic 1M windows, Copilot mixed-wire, DeepSeek
service_tier, WHATWG extension origins, POSIX rename-over-symlink).

wt1 update-path: PR lidge-jun#871, issue lidge-jun#879 (star-prompt deferral leakage), lidge-jun#557 optional
wt2 zero-leak: PRs lidge-jun#840 lidge-jun#841 lidge-jun#843 lidge-jun#844 lidge-jun#845 lidge-jun#847 (tracker lidge-jun#820)
wt3 provider-wire: PRs lidge-jun#746 lidge-jun#860 lidge-jun#839/lidge-jun#854, issue lidge-jun#875 triage, lidge-jun#616/lidge-jun#837 optional
wt4 server-config: PRs lidge-jun#850 (CORS origin confusion), lidge-jun#869 (symlink destruction)
wt5 windows-service: PRs lidge-jun#868, lidge-jun#861 (issue lidge-jun#848)
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
… bounds

Three explorer passes found wave-1 landings already on dev (31e07cc
framework, c9aa7f6 continuation cap+spill, e0b0926 cache caps,
be138ed translator budgets), so the campaign narrows to refinements:
lidge-jun#841 admission boundary (direct-spill oversized, bounded snapshot read,
bounded replay), lidge-jun#847 collector per-call scope + mandatory budget + 502
normalization, lidge-jun#844 incremental frames + typed partial-EOF, lidge-jun#845 NOOP
(superseded), lidge-jun#843 fixed-size SHA-256 key identities, lidge-jun#840 ACL
timeout-memo release + destination keying.
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
Raw model/session strings were retained as outer Map keys and raw
function name + canonical args as inner keys — all outside every byte
cap, so the advertised 64 MiB/2 MiB bounds never capped total retained
memory. Both key classes are now SHA-256 over length-prefixed UTF-8
components fed incrementally (no separator ambiguity, no concat
temporary), the fixed 64-byte session key is counted per entry, and
canonicalization runs through a bounded incremental walk that skips
replay for over-budget args instead of materializing an unbounded
string (replay_signature_oversized semantics: skip, never fail the
turn). Test-only derivation seams prove the fixed-key contract.
Refines lidge-jun#843.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants