fix(score): publish attachments through private bounded storage - #1241
seonghobae wants to merge 65 commits into
Conversation
Integrate protected develop@749511c3ad4000090048718f685c6bee6b3d2c25 into the canonical #864 owner branch without rewriting history. Preserve the shipped npm/PDF security baseline and first-playable-range changelog truth while retaining the bounded native score-PDF read implementation and regressions.
Re-emit the unchanged #864 tree so cancelled/never-materialized current-head workflow evidence is replaced by fresh exact-head runs. No production, test, dependency, workflow, or documentation content changes.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Fresh current-head sweep: source remains The next source repair is intentionally not being guessed into this branch. Fresh product trace shows successful No Ready transition, merge, blind rerun, no-op wake commit, or evidence transfer from predecessor heads. |
|
Owner-path update only; no Score Storage source change in this turn. #970 now has a Project Persistence descendant ( Keep #1241 Draft and do not infer that post-link interruption is solved. The remaining ambiguous window is still |
|
Consumer contract finding for the later Project Persistence reconciliation: current |
Owner / scope
Canonical Score Storage / Score Attachment lane for #1239. This PR owns write-time score confidentiality, bounded publication, no-clobber/object identity, abandoned-stage recovery, identity-safe cleanup, retention/removal authority, and the narrow Score UI orchestration that sequences project metadata acceptance against score-byte publication/deletion. It does not absorb #865 read-time allocation/content validation, #970 Project Persistence workspace/durable-project authority, or Resource Admission/MIR.
Protected base remains
develop@314ddeae7b775a4957594b599358c8255617eb2e. #865 remains the foundation owner at1f4877413e2eed30b224eaf1b095af3b0b905cb0; fresh compare isahead 52 / behind 0. This branch stays Draft until #865 integrates.Exact current head:
bbfa0b5693590f12ef29d4a9545426f34ed558c1.Publication / recovery contract retained
0600; Windows consumes and tests the app-owned parent-DACL inheritance contract.FILE_ID_INFO.FileDispositionInfo; Unix deletion pins the parent directory and usesopenat(..., O_NOFOLLOW)+ identity recheck +unlinkat, with the final basename race still explicit.falseonly for an observed missing child under an existing scores workspace; unsafe/indeterminate state remains an error..score-<uuid>.stageis recovered under an OS-released cross-process workspace lease before the next publication. Stage+destination ambiguity remains preserved/fail-closed rather than guessed.The process-abandoned staging repair remains the earlier source lineage:
2c55e34...realistic child-process stage fixture,ad2c463...lease/recovery owner,a1f21f1...crate-root routing, with current exact native evidence below. It does not claim packaged-Tauri process kill, every internal publisher instruction point, explicit cancellation, disk-full, permission failure, power loss, old unleased-build compatibility, or post-link lifecycle reconciliation.Metadata/byte lifecycle ordering — source RED → causal repair
A second buyer-visible defect existed in
ScoreView: attachment publication calledonSongUpdatewithout awaiting a durability outcome and immediately opened the PDF; detach deleted the PDF first and only then updated attachment metadata. Once #970 supplies an async durable project mutation owner, those orders can respectively present an uncommitted attachment as accepted or leave durable metadata pointing at bytes the same interaction already destroyed.Source-level RED
5450dbbb7dfdb449c393e1b4d94bc60559db4989adds three component regressions:The general
cirun for that test-only head was superseded/cancelled by descendants before it produced a terminal verdict, so no hosted RED is claimed. The pre-repair source is deterministic RED for all three assertions because it neither awaitedonSongUpdateon attach nor sequenced detach metadata before deletion.Causal repair
48d77841da464e8b21d2a998b58f13ee5d23311dmakesScoreViewconsumevoid | boolean | Promise<void | boolean>from the project owner.falsemeans the async owner did not durably accept the metadata. Attach then leaves the already-published PDF untouched as a recovery candidate and does not open/present it as accepted. Detach commits metadata first; only an accepted update may callremove_score_pdf. A later deletion failure can leave an unreferenced cleanup candidate, but cannot create a durable project reference to bytes this interaction already deleted. Legacy synchronousvoidremains compatible for the pre-#970 stack and is explicitly not durability evidence.docs/traceability/score-attachment-publication.mdis code-current at this head, including alternatives, Security Notes, test points and claim boundaries.Security Notes
0600; Windows consumes the parent DACL. Ordinary errors do not emit PDF bytes or absolute buyer paths.Exact-current-head evidence / remaining acceptance
Exact
bbfa0b5693590f12ef29d4a9545426f34ed558c1score-storage-nativerun35473815994is terminal SUCCESS on Windows Server 2025 job105979458946and macOS job105979459071; both checked out the exact head and passed the owned Score Storage/recovery unit and native publication/retention/interruption/restart/wiring regressions.That native workflow does not execute the new React lifecycle-ordering regression. Exact-head repository
cirun35473815972is still queued, so frontend GREEN is not claimed.build-baselinerun35473815978is in progress; Security Scan35473815985, SBOM35473815974, SAST Semgrep35473815989, and CodeQL PR35473815973remain queued/pending. There is no qualifying independent non-author approval. Owner-native success is not repository-wide GREEN.Still required: #865 protected integration; #970 workspace/durable-project reconciliation and fresh Windows ACL acceptance; restart reconciliation for
PDF published -> metadata not durable; post-link interruption/cancellation/disk-full/permission/power-loss recovery; complete project deletion/recovery rollback; old unleased-build compatibility disposition; remaining Unix name-race disposition; exact frontend/coverage/security/SBOM/review settlement; packaged fault evidence; signing/notarization and immutable release/updater rollback. Do not force-push, weaken gates, or manufacture settlement.UI Delivery Gate: FAIL — interaction ordering changed and has focused component regression source, but exact-head browser/E2E, keyboard/touch, Narrator/VoiceOver, 400% zoom, responsive and locale evidence were not added in this slice.
Commercial Release Gate: FAIL — stage-only process-abandonment and native storage evidence remain GREEN, and metadata-before-delete ordering is repaired in source, but exact frontend CI plus the lifecycle/release acceptance above remain open.