GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — cold-store-reaper: shape-harden D1 response handling (#2618) by dezren39 · Pull Request #3466 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 1, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Fixes #2618 (queue task 5395; pinned by triage task 3859).

Three D1 response sites in pkgs/cold-store-reaper/cold_store.py assumed object shapes and raised AttributeError on malformed bodies:

  • d1_error_message now never raises: a shared _d1_first_error_message helper extracts the API message only when the payload is a dict whose errors list starts with a dict carrying a message; every other shape falls back to the existing truncated raw-text behaviour.
  • _d1_select and the manifest sync loop parse via _d1_parse_payload: a non-JSON or non-object 200 body raises ColdStoreError naming the unexpected shape; on the success: false path the API message is used when present, else unknown error — never AttributeError.
  • _d1_select also refuses a non-object first result entry with a ColdStoreError naming the shape.

Well-formed bodies behave exactly as before (rows, API messages, empty-result tolerance).

Tests: 7 new regression cases in TestD1ResponseShapes (array/string/numeric bodies, errors: [null] / ['boom'], result: ['x'], sync-loop non-object body, plus unchanged controls). Full suite on the laptop: python3 -m unittest tests.test_cold_store — 96 tests OK (1 skipped, node-dependent).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@dezren39
cold-store-reaper: shape-harden D1 response handling (#2618)
bede64c
d1_error_message never raises: non-dict payloads and errors lists whose
first entry is not a dict with a message fall back to the truncated
raw-text behaviour. _d1_select and the manifest sync loop raise
ColdStoreError naming the unexpected shape for non-object bodies and
non-object result entries, and use the API message only when
errors[0] is a dict with one, else unknown error. Regression tests
cover array/string/numeric bodies, errors [null]/[string], and
result [string] shapes plus unchanged well-formed controls.
@dezren39
dezren39 requested a review from a team as a code owner November 1, 2026 09:53
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T09:55:20.668182Z bede64c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit 472b752 into main Nov 1, 2026
2 of 3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/5395-2618-d1-shape-hardening branch November 1, 2026 09:55
@dezren39 dezren39 mentioned this pull request Nov 1, 2026
cold-store-reaper: D1 response handling assumes object shapes throughout — array/string bodies and non-object errors/result entries raise AttributeError instead of ColdStoreError #2618
Closed
@dezren39 dezren39 mentioned this pull request Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

cold-store-reaper: D1 response handling assumes object shapes throughout — array/string bodies and non-object errors/result entries raise AttributeError instead of ColdStoreError

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.