Skip to content

fix(antigravity): preserve history around UUID-less bookkeeping steps - #3462

Merged
steipete merged 3 commits into
steipete:mainfrom
urda:urda/agy-uuid-less-steps
Sep 7, 2026
Merged

fix(antigravity): preserve history around UUID-less bookkeeping steps#3462
steipete merged 3 commits into
steipete:mainfrom
urda:urda/agy-uuid-less-steps

Conversation

@urda

@urda urda commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Antigravity bookkeeping rows without a step UUID caused the entire local history provider to be withheld as incomplete. Permit those rows after charging their row and byte budgets, while keeping malformed data and exhausted budgets as hard failures. A lone identified timestamp cannot stand for every occurrence of a reused UUID when unidentified rows are present.

Rows without UUIDs can still carry bot identity. Record that evidence before skipping UUID positioning: a duplicate bot ID with unknown UUID permanently invalidates exact and positional matches, regardless of scan order, matching timestamps, or absent timestamps. This addresses the review finding on the original revision. Keep ambiguous positional slots intact so later timestamps never move into them.

Share the identical step-occurrence structs, remove an unused counts projection, and apply positional ambiguity during timestamp selection. The final PR reduces production code by four lines. Token counts, pricing, credentials, discovery roots, and stored data remain unchanged. Changelog and documentation are updated; thanks @urda.

Maintainer validation: six synthetic duplicate-bot combinations failed 18 assertions on the original PR and pass after repair. All 406 focused Antigravity tests across 34 suites pass, including harmless bookkeeping, reused UUIDs, embedded timestamps, malformed rows, and budgets. make check passes and independent review is clean. The full make test suite passed all 1,028 selections across 86 groups without retries. The main integration preserves the tested Antigravity source, tests, and documentation byte-for-byte; integration make check also passes. Exact-head CI must pass before merge.

Contributor live evidence, collected on the original proposal: @urda compared the shipped 0.56.6 CLI and a rebuilt CLI against the same 211 stable local session databases from agy 1.1.27, using read-only scratch copies with WAL sidecars. Complete coverage increased from 208 to 211; the three recovered sessions contained 80,067, 48,183, and 5,299,395 tokens. Removing UUID-less bookkeeping rows from copies also made the shipped CLI return complete coverage, isolating the original cause. One previously passing session's output, excluding updatedAt, matched byte-for-byte. Three actively written sessions were excluded because both binaries reported them incomplete until checkpointing. This is contributor-reported live evidence; the maintainer's final ambiguity repair uses synthetic native SQLite fixtures.

This builds on #3266, #3396, and #3403. It is distinct from #3412's cost-estimation changes. Earlier proposal #3451 remains related; no unrelated issue is claimed resolved.

@clawsweeper

clawsweeper Bot commented Sep 7, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 88f731dd0e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Sources/CodexBarCore/Providers/Antigravity/AntigravityLocalSQLite.swift Outdated
@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 7, 2026
@clawsweeper

clawsweeper Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 4:00 AM ET / 08:00 UTC.

ClawSweeper review

What this changes

Preserve Antigravity token history when bookkeeping steps lack UUIDs while retaining timestamp ambiguity checks, with focused regression tests and documentation.

Merge readiness

Ready for maintainer review

The fix remains necessary and has no remaining actionable findings. The earlier ambiguity defect is repaired, the integrated result preserves the reviewed implementation, and the contributor’s live comparison supports the recovery behavior.

Priority: P2
Reviewed head: f01f7f0d77dbaeea3904ac5bc896f9e78b30f0c8

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with useful real-session evidence and thorough regression coverage; no actionable defect remains.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): Contributor-reported shipped-versus-rebuilt CLI results exercise the changed SQLite history reader on 211 stable real sessions and show three recovered histories; final ambiguity hardening is supported by native SQLite regressions, and integration preserves the reviewed code.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Contributor-reported shipped-versus-rebuilt CLI results exercise the changed SQLite history reader on 211 stable real sessions and show three recovered histories; final ambiguity hardening is supported by native SQLite regressions, and integration preserves the reviewed code.
Evidence reviewed 8 items Repository policy: Read the complete root AGENTS.md; no nested AGENTS.md files or maintainer-notes directory were found under the applicable trees. Applied focused parser coverage, provider isolation, and Keychain-safe review guidance. Tests and builds were not executed under the read-only review contract.
Current main still needs the fix: Fetched main still sets rowsAreValid=false for a parsed step without a UUID. Database completeness propagates across sessions, and the snapshot loader withholds incomplete reports.
Latest release retains the rejection: The v0.56.7 source contains the same UUID-less-row rejection; the requested behavior is not present in the supplied latest release.
Findings None None.
Security None None.

How this fits together

CodexBar reads Antigravity session databases to calculate local token history. Its timestamp recovery and completeness checks determine whether the CLI and app can display that history.

flowchart TD
    A[Local session databases] --> B[Read generation usage]
    B --> C[Recover missing timestamps]
    D[Step metadata and bot identities] --> C
    C --> E{Complete and consistent?}
    E -->|Yes| F[Display token history]
    E -->|No| G[Withhold uncertain history]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta production -4 lines; tests +144 lines The focused repair adds regression coverage while consolidating duplicate production records.
Reported real-session recovery 208/211 → 211/211 complete sessions The contributor’s same-data CLI comparison demonstrates recovery of three previously withheld histories.

Technical review

Best possible solution:

Retain bounded timestamp recovery that tolerates unrelated bookkeeping while withholding history whenever identity or date evidence remains ambiguous.

Do we have a high-confidence way to reproduce the issue?

Yes: current main explicitly invalidates the scan when a timestamp recovery database includes a UUID-less step; the supplied live comparison corroborates that mechanism. This review inspected source without executing tests.

Is this the best way to solve the issue?

Yes: the patch repairs the existing reader in place, preserves budget and malformed-row checks, and prevents unidentified rows from creating falsely unique timestamp evidence.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 46b8840b2205.

Labels

Label justifications:

  • P2: This fixes a bounded Antigravity history-reading defect without changing credentials, settings, or other providers.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Contributor-reported shipped-versus-rebuilt CLI results exercise the changed SQLite history reader on 211 stable real sessions and show three recovered histories; final ambiguity hardening is supported by native SQLite regressions, and integration preserves the reviewed code.
  • proof: sufficient: Contributor real behavior proof is sufficient. Contributor-reported shipped-versus-rebuilt CLI results exercise the changed SQLite history reader on 211 stable real sessions and show three recovered histories; final ambiguity hardening is supported by native SQLite regressions, and integration preserves the reviewed code.

Evidence

What I checked:

  • Repository policy: Read the complete root AGENTS.md; no nested AGENTS.md files or maintainer-notes directory were found under the applicable trees. Applied focused parser coverage, provider isolation, and Keychain-safe review guidance. Tests and builds were not executed under the read-only review contract. (AGENTS.md:1, f01f7f0d77db)
  • Current main still needs the fix: Fetched main still sets rowsAreValid=false for a parsed step without a UUID. Database completeness propagates across sessions, and the snapshot loader withholds incomplete reports. (Sources/CodexBarCore/Providers/Antigravity/AntigravityLocalSQLite.swift:334, 46b8840b2205)
  • Latest release retains the rejection: The v0.56.7 source contains the same UUID-less-row rejection; the requested behavior is not present in the supplied latest release. (Sources/CodexBarCore/Providers/Antigravity/AntigravityLocalSQLite.swift:334, d8f4cec19b82)
  • Prior ambiguity finding resolved: Bot identity is recorded before UUID-less rows are skipped. Missing UUIDs permanently invalidate exact bot matches, and positional recovery retains ambiguous slots. The new six-case duplicate-bot regression covers both scan orders and matching, conflicting, or absent timestamps. (Sources/CodexBarCore/Providers/Antigravity/AntigravityLocalSQLite.swift:328, f01f7f0d77db)
  • Integration continuity: Comparison with the previously reviewed head returned no differences in production source, regression tests, or documentation. The verified test merge has the pinned base followed by the exact PR head as parents, and preserves those same files. The earlier conflict warning no longer establishes a blocker. (f01f7f0d77db)
  • Contributor live comparison: The complete supplied PR body, captured under sourceRevision 96cfae954f766ade5a1a49e59f1bdcdb86716685b30ebfe512fe2a7029f1ddd0, reports shipped-versus-rebuilt CLI runs over 211 stable agy 1.1.27 session databases: complete coverage increased from 208 to 211. Removing UUID-less rows from copies also restored shipped-CLI coverage, and one previously passing session remained byte-identical excluding updatedAt. Final ambiguity changes have supplemental native SQLite regression coverage; this review did not independently replay private data.

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • WeGoToMars: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • chid: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-07T04:46:43.697Z sha 88f731d :: blocked before merge. :: [P2] Preserve bot-ID ambiguity before skipping UUID-less rows
  • reviewed 2026-09-07T07:13:16.354Z sha d5e34fe :: blocked before merge. :: none

Unify step occurrence records and preserve ambiguous positional slots without rebuilding a second lookup.

Co-authored-by: Peter Urda <peter.urda@gmail.com>
@steipete steipete changed the title fix(antigravity): skip UUID-less step rows during timestamp recovery fix(antigravity): preserve history around UUID-less bookkeeping steps Sep 7, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Sep 7, 2026
@steipete
steipete merged commit a1391fc into steipete:main Sep 7, 2026
9 checks passed
@urda
urda deleted the urda/agy-uuid-less-steps branch September 8, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants