Skip to content

Enforce numeric Alembic revisions, add OneShot integration story coverage, and package API/Web containers in CI - #4

Merged
MinecraftFuns merged 5 commits into
mainfrom
copilot/add-timestamp-fields-to-models
Mar 24, 2026
Merged

Enforce numeric Alembic revisions, add OneShot integration story coverage, and package API/Web containers in CI#4
MinecraftFuns merged 5 commits into
mainfrom
copilot/add-timestamp-fields-to-models

Conversation

Copilot AI commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

This PR addresses three gaps: migration ordering stability, missing full-story module integration coverage, and missing separate API/Web container packaging in CI. It migrates Alembic to numeric revision IDs, adds end-to-end OneShot extraction integration tests, and adds matrix-based container builds for both services.

  • Alembic: numeric revision convention

    • Replaced hash-style revision naming with numeric chain:
      • 0000_base.py (base marker)
      • 0001_add_timestamps.py (timestamps migration)
    • Updated revision metadata (revision, down_revision) to enforce sortable numeric chronology.
    • Removed the prior non-numeric revision file.
  • Integration coverage: full OneShot extraction user story

    • Added api/tests/test_oneshot_integration.py to validate the complete module flow:
      • admin issues token
      • one-shot upload succeeds once and rejects replay
      • admin audit endpoints return token/file records with expected fields
      • admin download returns attachment with original filename
      • missing disk file and missing DB metadata both return 404
    • Kept focused security/route tests in test_oneshot.py and moved full-story coverage into dedicated integration test file.
  • CI packaging: separate API and Web containers

    • Added api/Dockerfile and web/Dockerfile.
    • Extended .github/workflows/ci.yml with container-packaging matrix job to build:
      • oneshot/api:ci-<sha>
      • oneshot/web:ci-<sha>
    • Added explicit least-privilege workflow permissions (contents: read) at workflow scope.
container-packaging:
  strategy:
    matrix:
      include:
        - name: api
          context: ./api
          dockerfile: ./api/Dockerfile
        - name: web
          context: ./web
          dockerfile: ./web/Dockerfile

Copilot AI and others added 5 commits March 24, 2026 04:14
Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com>
Agent-Logs-Url: https://github.com/BTreeMap/OneShot/sessions/bdc10cae-a610-4dbe-be98-e85ae99c06a3
…t changes

Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com>
Agent-Logs-Url: https://github.com/BTreeMap/OneShot/sessions/bdc10cae-a610-4dbe-be98-e85ae99c06a3
…, and package api/web containers in ci

Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com>
Agent-Logs-Url: https://github.com/BTreeMap/OneShot/sessions/e90da8ec-4954-4585-9d6c-23f08852a9e5
@MinecraftFuns
MinecraftFuns marked this pull request as ready for review March 24, 2026 14:16
@MinecraftFuns
MinecraftFuns merged commit 62b7ee5 into main Mar 24, 2026
11 of 12 checks passed
@MinecraftFuns
MinecraftFuns deleted the copilot/add-timestamp-fields-to-models branch March 24, 2026 14:16
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.

2 participants