Skip to content

Make Go module uploads immutable - #5

Draft
philipgreat wants to merge 1 commit into
test/masking-registry-gatefrom
fix/gomod-immutable-4
Draft

philipgreat wants to merge 1 commit into
test/masking-registry-gatefrom
fix/gomod-immutable-4

Conversation

@philipgreat

Copy link
Copy Markdown
Contributor

Fixes #4.

Go module artifact paths are now create-only. Known duplicates return HTTP 409 before blob creation. A PostgreSQL unique index on non-empty asset paths closes concurrent PUT races, and startup reports pre-existing duplicate paths before attempting the index.

Verification on a dedicated PostgreSQL test database:

  • cargo check -p teaql-registry --tests --locked
  • cargo fmt --all --check
  • cargo test -p teaql-registry --test multiformat_test --locked -- --test-threads=1: 9 passed, 0 failed
  • Duplicate mod, zip and info uploads return 409; original downloaded bytes remain unchanged.
  • Duplicate requests produce no replacement blob metadata.
  • Concurrent PUTs produce one 201 and one 409.
  • Dedicated test database removed after verification.

Deployment gate: audit existing asset path duplicates before the first restart. The currently running Registry container was not rebuilt or restarted, and HANA remained stopped.

@philipgreat
philipgreat changed the base branch from main to test/masking-registry-gate September 29, 2026 01:44
@philipgreat

Copy link
Copy Markdown
Contributor Author

Base corrected to test/masking-registry-gate, the actual parent of this fix. The PR now contains only the six files for issue #4 and is mergeable. The current CI workflow filters pull_request to main/master, so this test-branch PR has no GitHub checks; it must not be described as CI green.

Local isolated PostgreSQL gate at exact HEAD 7337f8b:

  • cargo fmt --all --check: PASS
  • cargo check -p teaql-registry --tests --locked: PASS
  • cargo clippy -p teaql-registry -p registry-tui --all-targets --no-deps --locked -- -D warnings: PASS
  • cargo test --locked -- --test-threads=1: exit 0; all test binaries and doc-tests passed (84 executed tests, zero failures)
  • Unique asset path index present after tests; duplicate non-empty asset path count zero.

The dedicated test database was removed after validation. No running Registry container was rebuilt or restarted; HANA remained stopped. Integration into main and deployment remain separate gates.

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.

Make Go module uploads immutable at the Registry persistence boundary

1 participant