fix: bound portable subscriber refresh without background repacks - #163
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 29, 2026, 10:49 AM ET / 14:49 UTC. ClawSweeper reviewWhat this changesThe PR adds a strict portable-subscriber refresh command, hardens portable initialization and Git execution, preserves runtime mirrors, and adds related tests and documentation. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 7 items remain Keep this draft PR open: current main does not contain its portable-refresh implementation, but the release heading is premature and real behavior proof remains required before merge. Priority: P2 Review scores
Verification
How this fits togetherGitcrawl reads portable Git checkouts containing archive databases, while writable operations use a separate runtime mirror. This PR controls how a subscriber validates its configured origin, updates the checkout, and promotes a verified archive to that mirror. flowchart LR
A[Configured portable store] --> B[Subscriber refresh]
C[Expected origin] --> D[Origin validation]
B --> D
D --> E[Fetch and artifact checks]
E --> F[Clean checkout advancement]
E --> G[Runtime mirror preservation]
F --> H[Gitcrawl archive reads]
G --> H
Decision needed
Why: This security hardening can stop existing initialization scripts, so maintainers must confirm the upgrade contract rather than infer it from the implementation. Before merge
Findings
Agent review detailsSecurityNeeds attention: The remote-validation design is source-backed, but its final network-effect boundary has no real after-fix evidence yet. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the section unreleased until formal release preparation, document the credential-helper migration, and land only after a redacted real subscriber run proves the allowed and rejected origin paths. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature-and-fix PR: source fixtures cover raw/gzip transitions, preservation, and refusals, but they are not a current production bug reproduction. Is this the best way to solve the issue? No—not yet. The safety design is coherent, but release metadata must remain accurate and the remote-authority behavior needs real after-fix evidence. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning high; reviewed against 56bf348dcad0. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
Summary
Fix portable initialization against manifest-backed gzip archives while keeping the configured database path logical (
.db). Initialization validates portable arguments before Git work and validates the selected artifact before saving configuration.Add
gitcrawl portable refreshfor scheduled subscribers. Canonical cross-process ownership, explicit maintenance suppression, frozen-artifact validation, timeout, free-space and growth limits protect the update boundary. The strict path does not reset, reclone, prune, remove sidecars, or regenerate configuration. Legacy recovery remains separate.Preserve genuine writable runtime data across refresh and ordinary reads. Disposable raw replicas record their validated source digest and use immutable SQLite reads, so reader-created sidecars cannot incorrectly turn them into permanently stale local state. Status reports the actual usable gzip artifact or runtime rather than an absent logical file.
Reject credential-bearing remote URLs before Git execution while retaining legitimate SSH usernames and SCP syntax. This addresses the remote-userinfo review finding without breaking normal SSH transport identity.
Validation
46ec75epassed on Ubuntu and macOS, including formatting, tidy, vet, vulnerability/deadcode scans, tests, release-script checks and snapshot builds. Whole-project coverage is 85.1% on both platforms, with the existing 85% gate unchanged. CodeQL, Docker and secret scanning also passed.The synthetic stores contained no production archive data or credentials. Real fleet deployment follows the separately verified signed release; no production deployment is claimed by these tests.
The 0.9.3 changelog is dated. Publication remains owned by the official release workflow after landing.