Skip to content

fix(raster): bound direct PostGIS import payloads - #3131

Merged
mikemcdougall merged 5 commits into
trunkfrom
fix/rast-014-bound-direct-import
Aug 9, 2026
Merged

fix(raster): bound direct PostGIS import payloads#3131
mikemcdougall merged 5 commits into
trunkfrom
fix/rast-014-bound-direct-import

Conversation

@mikemcdougall

Copy link
Copy Markdown
Collaborator

Pull Request

Issue Link

Related to #3098

Summary

Bounds the legacy synchronous ST_FromGDALRaster import path before it can materialize an oversized raster in the AOT serving process. This is the fail-closed safety slice; the durable staged worker pipeline remains open in RAST-014.

Changes Made

  • Caps direct PostGIS raster imports at 50 MiB even when the general synchronous import limit is configured higher.
  • Replaces unbounded File.ReadAllBytesAsync with a length-admitted exact reader that also rejects concurrent file growth.
  • Adds a regression test proving oversized payloads are rejected before a database connection opens.

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Architecture tests pass
  • Manual testing performed

Gate Impact

  • PR gates (build, test, governance)
  • Nightly gates (conformance, performance, security)
  • Release gates (packaging, publishing)
  • Deploy gates (promotion, post-apply validation)
  • None — no gate impact

Docs or Contract Impact

  • OpenAPI spec changed
  • Protobuf/gRPC contract changed
  • Control plane SDK surface changed
  • Documentation updated
  • None — no docs or contract impact

Release/Deploy Impact

  • Requires coordinated release across repos
  • Requires database migration
  • Requires infrastructure changes
  • Requires environment variable or secret changes
  • None — standard merge-and-release flow

Breaking Changes

None. Inputs above the legacy direct-import ceiling are now rejected fail-closed until the staged durable path lands.


Pre-PR Checklist

  • Ran scripts/ci/pre-pr-check.sh and all checks passed
  • Commit messages follow conventional format: type: description (#issue)
  • PR title matches main commit message
  • Issue number linked above
  • Tests added for new functionality
  • If protocol/auth behavior changed: updated compatibility contract
  • If breaking admin/control-plane API changes: updated migration guide
  • OPENAPI_BREAKING_CHANGE_APPROVED — intentional Admin API break acknowledged for this PR
  • If breaking gRPC/proto wire changes: confirmed with explicit review

@mikemcdougall
mikemcdougall marked this pull request as ready for review August 9, 2026 07:20
@mikemcdougall

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: a5dcece713

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mikemcdougall

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: f109806948

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/Honua.Import/Features/RasterImport/RasterImportEndpoints.cs
@mikemcdougall

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 87672c4edd

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mikemcdougall

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 6cec470e11

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mikemcdougall mikemcdougall added train:landing PR in an in-flight train batch train:escalated dropped by train; needs human fix and removed train:landing PR in an in-flight train batch labels Aug 9, 2026
@mikemcdougall

Copy link
Copy Markdown
Collaborator Author

Merge train escalated this batch to a human: CI failure not attributable to a single member diff (and not autofixable). This PR is held out of future batches until the train:escalated label is removed.

@mikemcdougall mikemcdougall added train:landing PR in an in-flight train batch and removed train:escalated dropped by train; needs human fix labels Aug 9, 2026
@mikemcdougall
mikemcdougall merged commit 9b6893d into trunk Aug 9, 2026
19 of 23 checks passed
@mikemcdougall mikemcdougall removed the train:landing PR in an in-flight train batch label Aug 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