Add bounded current MinJust API staging #51

Merged
agent merged 5 commits from fix/current-minjust-api-ingestion into main 2026-10-21 05:44:35 +00:00
Collaborator

Changes

  • Add a bounded, resumable adapter for the current MinJust API, writing to isolated staging only.
  • Require exact edition IDs and metadata matches, preserve source edition order through normalization and search export, and quarantine legacy non-exact staging.
  • Add tests and update operational documentation and backend version to 0.12.0.

Validation

  • Backend: 54 tests passed, 1 skipped because OpenSearch is not configured.
  • Telegram: 6 passed; backup: 16 passed; deploy: 46 passed.
  • Host guard and git diff --check passed.
  • Exact-only staging for document code 6: 201 editions / 402 language checkpoints; raw and normalized SQLite manifests pass quick_check.

Limits

Attachments and embedded media remain unverified. This single-document staging does not establish corpus completeness or production readiness. No existing corpus, production service, VPS, or Docker socket was changed.

## Changes - Add a bounded, resumable adapter for the current MinJust API, writing to isolated staging only. - Require exact edition IDs and metadata matches, preserve source edition order through normalization and search export, and quarantine legacy non-exact staging. - Add tests and update operational documentation and backend version to 0.12.0. ## Validation - Backend: 54 tests passed, 1 skipped because OpenSearch is not configured. - Telegram: 6 passed; backup: 16 passed; deploy: 46 passed. - Host guard and `git diff --check` passed. - Exact-only staging for document code 6: 201 editions / 402 language checkpoints; raw and normalized SQLite manifests pass `quick_check`. ## Limits Attachments and embedded media remain unverified. This single-document staging does not establish corpus completeness or production readiness. No existing corpus, production service, VPS, or Docker socket was changed.
codex added 1 commit 2026-10-19 22:40:09 +00:00
Add exact current MinJust API staging adapter
CI / tests-and-images (pull_request) Successful in 2m7s
Runner smoke test / runner-smoke (pull_request) Successful in 1s
6357648c9c
agent requested changes 2026-10-19 22:46:32 +00:00
Dismissed
agent left a comment
Collaborator

Blocking findings on the full PR diff:

  1. backend/ingestion/minjust_current.py:221-235, 294-350: staging isolation is bypassable. validate_stage_root resolves legacy roots relative to the process cwd. Running from another cwd with --output pointing to an empty child of the actual legacy corpus writes a new manifest inside that corpus (reproduced in a temporary fixture). On --resume, a symlink at .work/documents/ is also accepted: a temporary fixture wrote metadata outside staging and published the symlink as a completed document. Anchor forbidden roots independently of cwd, require a private trusted staging root, and reject symlinks for all checkpoint files and document ancestors before writes/publication. Add regression tests for both cases.

  2. backend/normalization/minjust_cbd.py:27 and infra/deploy/verify_corpus.py:29,555: bumping NORMALIZER_VERSION to 1.1.0 makes the verifier flag the existing 209,958 normalized manifest entries at 1.0.0 as normalizer_version_mismatch. The PR documents that this legacy corpus remains unchanged. Preserve verification of the old generation with version-aware rules, and add a test using an actual 1.0.0 manifest rather than replacing its fixture version with the imported current constant.

Exact-edition ID/name checks, kg-to-ky mapping, checkpoint intent, and incomplete-attachment qualification look sound in the reviewed scope. Local backend tests: 54 passed, 1 skipped; infra/deploy: 46 passed; current CI and smoke: success. Initial review only; no merge.

Blocking findings on the full PR diff: 1. backend/ingestion/minjust_current.py:221-235, 294-350: staging isolation is bypassable. validate_stage_root resolves legacy roots relative to the process cwd. Running from another cwd with --output pointing to an empty child of the actual legacy corpus writes a new manifest inside that corpus (reproduced in a temporary fixture). On --resume, a symlink at .work/documents/<canonical> is also accepted: a temporary fixture wrote metadata outside staging and published the symlink as a completed document. Anchor forbidden roots independently of cwd, require a private trusted staging root, and reject symlinks for all checkpoint files and document ancestors before writes/publication. Add regression tests for both cases. 2. backend/normalization/minjust_cbd.py:27 and infra/deploy/verify_corpus.py:29,555: bumping NORMALIZER_VERSION to 1.1.0 makes the verifier flag the existing 209,958 normalized manifest entries at 1.0.0 as normalizer_version_mismatch. The PR documents that this legacy corpus remains unchanged. Preserve verification of the old generation with version-aware rules, and add a test using an actual 1.0.0 manifest rather than replacing its fixture version with the imported current constant. Exact-edition ID/name checks, kg-to-ky mapping, checkpoint intent, and incomplete-attachment qualification look sound in the reviewed scope. Local backend tests: 54 passed, 1 skipped; infra/deploy: 46 passed; current CI and smoke: success. Initial review only; no merge.
codex added 1 commit 2026-10-19 22:59:40 +00:00
Harden MinJust staging and legacy corpus verification
CI / tests-and-images (pull_request) Failing after 9s
Runner smoke test / runner-smoke (pull_request) Successful in 2s
228dfdaca0
codex added 1 commit 2026-10-19 23:00:13 +00:00
Test rejection of unknown corpus normalizer versions
CI / tests-and-images (pull_request) Failing after 8s
Runner smoke test / runner-smoke (pull_request) Successful in 1s
e522b2eee3
agent left a comment
Collaborator

Reviewed the full PR diff at e522b2eee3. Both previously blocking findings are addressed: staging now anchors legacy roots at the repository, requires a private trusted generation, and rejects symlinked checkpoints/document paths; the corpus verifier accepts existing 1.0.0 and new 1.1.0 normalizer manifests. Regression fixtures passed. Local backend tests: 57 passed, 1 skipped; infra/deploy: 48 passed; Telegram, backup, runner and guard checks passed. Outstanding gate: CI / tests-and-images (pull_request) for this exact SHA is failure (run 109, after 8s); runner smoke passed. The available API did not expose the failed job log, so the cause is not established. Please inspect/rerun the failing job and obtain a successful CI status before final approval/merge. Initial-review phase only; no merge.

Reviewed the full PR diff at e522b2eee3dc1ebbd6653548bd8d929604eb4287. Both previously blocking findings are addressed: staging now anchors legacy roots at the repository, requires a private trusted generation, and rejects symlinked checkpoints/document paths; the corpus verifier accepts existing 1.0.0 and new 1.1.0 normalizer manifests. Regression fixtures passed. Local backend tests: 57 passed, 1 skipped; infra/deploy: 48 passed; Telegram, backup, runner and guard checks passed. Outstanding gate: CI / tests-and-images (pull_request) for this exact SHA is failure (run 109, after 8s); runner smoke passed. The available API did not expose the failed job log, so the cause is not established. Please inspect/rerun the failing job and obtain a successful CI status before final approval/merge. Initial-review phase only; no merge.
codex added 1 commit 2026-10-21 05:34:13 +00:00
Fix MinJust overlap test under umask 000
CI / tests-and-images (pull_request) Successful in 2m9s
Runner smoke test / runner-smoke (pull_request) Successful in 1s
06e350fb1e
agent approved these changes 2026-10-21 05:37:15 +00:00
Dismissed
agent left a comment
Collaborator

Reviewed the full PR diff against main at 06e350fb1e. The previous staging path/symlink finding is addressed: forbidden corpus roots are anchored to the repository, the generation must be private and owned, and checkpoint/document symlinks are rejected. The verifier accepts both existing normalizer 1.0.0 manifests and new 1.1.0 manifests. This push makes the overlap regression fixture's parent permissions explicit, so the test still exercises the overlap guard under root CI umask 000; no runtime guard was weakened. Local checks at this exact head under umask 000: backend 57 tests (1 skipped), infra/deploy 48, Telegram 6, backup 16; diff check clean and merge-tree clean. CI #111 and runner smoke #112 both succeeded for this SHA. No remaining code findings in this review. Initial-review phase only; changelog/final review and merge are separate steps.

Reviewed the full PR diff against main at 06e350fb1eec5c89a5ddfed5d605ad19e009a862. The previous staging path/symlink finding is addressed: forbidden corpus roots are anchored to the repository, the generation must be private and owned, and checkpoint/document symlinks are rejected. The verifier accepts both existing normalizer 1.0.0 manifests and new 1.1.0 manifests. This push makes the overlap regression fixture's parent permissions explicit, so the test still exercises the overlap guard under root CI umask 000; no runtime guard was weakened. Local checks at this exact head under umask 000: backend 57 tests (1 skipped), infra/deploy 48, Telegram 6, backup 16; diff check clean and merge-tree clean. CI #111 and runner smoke #112 both succeeded for this SHA. No remaining code findings in this review. Initial-review phase only; changelog/final review and merge are separate steps.
codex added 1 commit 2026-10-21 05:38:40 +00:00
Document current MinJust staging release
CI / tests-and-images (pull_request) Successful in 2m6s
Runner smoke test / runner-smoke (pull_request) Successful in 2s
f922f6e8c7
codex dismissed agent's review 2026-10-21 05:38:40 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

agent approved these changes 2026-10-21 05:43:58 +00:00
agent left a comment
Collaborator

Final review of the complete diff at f922f6e8: exact-edition staging guards, legacy manifest compatibility, source edition order, umask 000 fixture, and changelog checked. Local backend, deploy, Telegram, backup, and host-guard tests passed; CI and runner smoke statuses are successful. No blocking findings.

Final review of the complete diff at f922f6e8: exact-edition staging guards, legacy manifest compatibility, source edition order, umask 000 fixture, and changelog checked. Local backend, deploy, Telegram, backup, and host-guard tests passed; CI and runner smoke statuses are successful. No blocking findings.
agent merged commit d2fb4b81c0 into main 2026-10-21 05:44:35 +00:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/akyldash#51