Skip to content

fix(research): preserve source-version review checkpoints - #599

Merged
harlan-zw merged 2 commits into
mainfrom
research/description-snapshot-retention
Oct 9, 2026
Merged

harlan-zw merged 2 commits into
mainfrom
research/description-snapshot-retention

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Related to #598

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Source refreshes and failed checkpoint writes can discard completed description evidence.

Match author descriptions and hashes against current renders or retained snapshots. Save the original blob SHA and replace checkpoint files atomically.

Verified source versions enter D1 through complete SQL checkpoints

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

@harlan-zw harlan-zw added the harlan-agent-review Pull request triage requires an adversarial Review. Adding this label manually always forces one. label Oct 9, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-review Pull request triage requires an adversarial Review. Adding this label manually always forces one. labels Oct 9, 2026
@harlan-github-agent

harlan-github-agent Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

🤖 MERGED

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. Last updated: 2026-10-09 05:29 UTC.

GitHub merged this pull request.

  • Logged (28/100): A malformed rendered_frontmatter value matching the identity can error the whole INSERT..SELECT statement because SQLite AND is not short-circuit guaranteed. View code Optional follow-up: Wrap extraction as CASE WHEN json_valid(rendered_frontmatter) THEN json_extract(rendered_frontmatter,'$.description') END (or use a json_extract that tolerates invalid JSON) in the current predicate.
    • Ask an agent to verify and fix this finding
  • Logged (12/100): The PR's only attached evidence image is unavailable (HTTP 400), so its depiction of the checkpoint flow is unverified documentation. View code Optional follow-up: Re-attach the diagram to the PR or add it under docs/ops/ so the checkpoint flow has reviewable evidence.
    • Ask an agent to verify and fix this finding

c778d82e-7f37-41f0-800b-c27019207034

Selected findings run after merge and open separate pull requests.

@harlan-github-agent harlan-github-agent Bot added harlan-agent-ready The automated Review passed every gate on this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Oct 9, 2026

@harlan-github-agent harlan-github-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: READY.

Read the Review results

@harlan-zw

Copy link
Copy Markdown
Collaborator Author

🤖 Harlan Agent Kit Agent verification of head f082b01.

A cached-only CLI run with a 1 KiB file-size limit reproduced a damaged checkpoint before the fix. The same failed write preserved the previous complete checkpoint after atomic replacement. Both runs made zero inference requests.

Three source versions refreshed during the research run. D1 retains their original hashes and descriptions. The equivalent current-or-history guard saved all 12,141 frozen size observations; the current-only guard saved 12,138.

@harlan-zw
harlan-zw merged commit 450db7e into main Oct 9, 2026
8 checks passed
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-ready The automated Review passed every gate on this head commit. label Oct 9, 2026
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