Repository navigation
[Security] Enforce one canonical local-audio resource budget before analysis #781
Description
Canonical implementation authority
Resource Admission & Decode의 단일 source owner는 PR #866 (fix/audio-resource-policy-781)입니다. Current exact head는 7156aebd4a745cab4842d15aba319a72c80e1d98, protected base는 develop@314ddeae7b775a4957594b599358c8255617eb2e이며 Open / Draft / mergeable입니다. 현재 head는 protected develop의 ordinary ahead-only descendant이며 force-push/destructive rebase를 사용하지 않았습니다. 이 bounded context를 다른 PR로 fan-out하지 않고 dependent/preservation delta는 완전 승계 전까지 닫지 않습니다.
#970은 durable Project Persistence, #1160은 protected/released Resource Admission + Project Persistence의 Active Player 소비를 소유합니다. #1204는 repository-generic Security Notes checker, central .github는 required-workflow/CodeQL lifecycle의 canonical owner입니다. Draft #866을 released truth로 소비하지 않습니다.
Current resource policy
#866은 encoded-byte admission, source sample-rate/channel/duration admission, canonical float32 mono decode, decoded sample/memory/finiteness checks, owned-process timeout/termination/reap, analysis protocol admission과 관련 회귀를 같은 owner lane에 유지합니다. 현재 기본 admission은 source 8–192 kHz, 1–2 channels, 15분, encoded 100 MiB, canonical 44.1 kHz float32 mono입니다.
#1244 exact-limit harness는 feature-gated standalone helper + process_output_large_streams integration으로 통합됐고 superseded libtest self-reentry unit은 제거됐습니다. Exact predecessor c0c3956d10edb6e21a154c9c5de075dd2bde3217의 dedicated run 35686172417은 Windows Server 2025와 macOS 15에서 stdout/stderr 각각 정확한 1 MiB ceiling과 inherited-handle descendant cleanup을 통과했습니다. 이 predecessor 결과는 current head에 전용하지 않습니다.
Windows process-tree owner
RED 709c452266a202d767db640c26ada4bc0e934779은 helper parent가 inherited stdout/stderr를 가진 5초 descendant를 시작하고 즉시 종료하도록 하며, production cleanup이 descendant lifetime/1 MiB ceiling을 약화하지 않고 2초 미만에 반환하도록 요구합니다.
Production ab3ae64760f320fd0b5fa58c6c0327d125b748c0은 desktop core에 OwnedProcess를 도입했습니다. Windows에서는 unnamed Job Object + JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE, CREATE_SUSPENDED, pre-execution Job assignment, Toolhelp/ResumeThread, retained Job handle, tree-wide TerminateJobObject 순서로 ordinary descendant lifetime을 소유합니다. Unix는 pre-exec process-group semantics를 유지합니다. spawn → AssignProcessToJobObject best-effort 설계는 descendant escape window 때문에 채택하지 않았습니다.
Analysis runner RED → owner unification
남아 있던 product gap은 run_analysis_engine이 configure_owned_process + Command::spawn을 직접 조립해 Windows에서 Job Object owner를 우회하던 것입니다.
RED 6025e120c9c9b18e8984281c3acde1478893b781은 Tauri analysis runner가 spawn_owned_process를 사용하고 old configure-then-spawn을 사용하지 않으며, direct-parent terminal/cancel/timeout/protocol failure에서 inherited reader join 전에 동일 process-tree owner를 정리하도록 요구합니다.
Repair lineage:
5533cbc95eb6d7b90c7422c9d0f50540ccb31037:OwnedProcess의 narrow native capability를 공개하되 PID/Job handle은 private 유지.01770c9934b5b0f4a7d2e4b78b1d85f553b855bd: desktop-core crate root에서 owner export.ae9a0f1cfbb2861b841f8ad343344d5d0b06af18:run_analysis_engine을spawn_owned_process+ owner methods로 이동. Job identity, JSONL admission, timeout/cancellation, direct-child exit-status truth는 유지.14885e893a55dbe46d28389dc9c50df7ecf8e261: dedicated Windows/macOS workflow가 core executable descendant/dual-pipe contract와 Tauri adapter contract를 같은 exact source head에서 모두 실행.2ec4d6e4b9c71ea7ae6e7bc75b445675748082a8: workflow-policy regression을 new owner paths에 binding.
No hosted RED is claimed because RED와 repair는 consecutive ordinary descendants입니다.
Focused-workflow RCA and predecessor GREEN
Exact 7a10a43bb643827c8674677e58ba42c64b81ac1a, run 35689880708에서 macOS core descendant/dual-pipe tests는 통과했지만 새 Tauri adapter step은 test 실행 전에 compile failure가 났습니다. 원인은 tauri::generate_context!()가 frontendDist: "../dist"를 요구하는데 focused workflow가 apps/desktop/dist를 만들지 않았기 때문입니다.
Repository canonical ci / rust-check의 pinned Node/npm → npm ci → npm run build --workspace @bandscope/desktop → Tauri check/test 순서를 그대로 채택했고, 빈 dist 디렉터리만 만드는 우회는 기각했습니다. 8a6a17a.../85b346e...가 workflow prerequisite/policy를 수리했고 600792545c...가 doctoring을 currentize했습니다.
Predecessor exact 600792545c8ed1f39f3d30aebf48d3926857a3bb, dedicated run 35690262543은 SUCCESS on Windows Server 2025 and macOS 15였습니다. 두 job 모두 executable descendant/dual-pipe contract, pinned npm/frontend prerequisite, native Tauri owned-process adapter contract를 통과했습니다. Build-baseline 35690262534와 Semgrep 35690262550도 predecessor exact head에서 SUCCESS였습니다. Current head가 이동했으므로 이 결과를 current evidence로 전용하지 않습니다.
Repository rust-check RED → current repair
Fresh child-check inspection에서 predecessor 600792545c...의 repository ci run 35690262503 안에 terminal failure가 확인됐습니다. gate / ci / rust-check job 106663752915은 macOS 15에서 cargo +stable check와 실제 product compile을 통과한 뒤 analysis_job_cancellation_contract의 8 tests 중 2개만 실패했습니다.
두 실패는 product behavior가 아니라 stale source-contract expectation이었습니다. 해당 test file은 Tauri runner가 아직 configure_owned_process(&mut command)와 terminate_owned_process(&mut process)를 호출한다고 요구했지만, canonical repair는 이미 spawn_owned_process(&mut command)와 OwnedProcess::terminate()로 이동했습니다. Dedicated native adapter contract는 이 새 owner path를 predecessor exact head에서 이미 실행 검증했습니다.
Ordinary descendant 7156aebd4a745cab4842d15aba319a72c80e1d98은 그 test file의 네 stale source-string assertion/message만 수리했습니다. 이제 spawn_owned_process(&mut command)와 process.terminate()를 요구하면서 process.kill(), Tauri-local process-group helper, Tauri-local POSIX signalling은 계속 금지합니다. Product source, timeout, capture ceiling, Job Object semantics, dependency, workflow/gate policy는 바꾸지 않았습니다.
Current exact generation은 새로 생성됐으며, latest read에서 build-baseline 35708793788, Semgrep 35708793853, native process-owner 35708793890, SBOM 35708793840, Security Scan 35708793924, CodeQL PR 35708793972, repository ci 35708793852가 queued/pending입니다. Predecessor GREEN을 새 head에 전용하지 않고 no-op wake commit/blind rerun도 하지 않습니다.
Claim boundary
두 product-owned subprocess path는 source에서 ordinary descendants에 대해 같은 owner를 사용합니다: Unix process group, Windows pre-execution Job Object admission. 이것은 sandbox, deliberate process-group/session escape 또는 Windows breakaway 방지, external process containment, egress/filesystem isolation, CPU/RAM/PID/disk/accelerator quota를 의미하지 않습니다.
1 MiB stdout/stderr ceiling은 parent-side capture만 제한합니다. Rights-cleared full-length rehearsal audio로 cancellation/resource-return latency, temp-artifact cleanup, decoder/resampler/downstream RSS/VRAM, explicit CPU/GPU budgets와 recognized MIR reproducibility를 별도로 검증해야 합니다.
Protected / central authority
BandScope protected develop과 central protected .github/main은 매 run fresh 확인합니다. Central workflow/bootstrap/CodeQL settlement를 BandScope copied workflow, synthetic status, duplicate scanner, self/admin approval 또는 gate weakening으로 우회하지 않습니다. Protected scripts/ci/agent_mention_router.py는 trusted PR-comment mention을 review agents로 dispatch하는 경로이며 source-fix writer contract가 아닙니다.
Next acceptance
7156aebd...를 유지하고 already-generated current-head gates의 terminal 결과만 RCA합니다.- Current exact native owner lane과 repository rust-check가 GREEN을 다시 세워야 하며
600792...predecessor results를 전용하지 않습니다. - Unchanged final head에 대해 zero actionable unresolved findings와 qualifying independent non-author approval을 확보합니다.
- Protected required contexts와 central settlement가 동일 identity에서 충족된 경우에만 normal protected merge합니다.
- Protected fix(audio): establish canonical local-audio resource policy #866 이후 fix(project): enforce crash-safe revision-bound persistence #970 crash-safe Project Persistence → feat(player): admit and bind playable stem artifacts #1160 Active Player consumption 순으로 ordinary non-force reconciliation합니다.
Scientific / commercial boundary
Current policy가 source rate/channel/duration과 decoded CPU-memory footprint를 admission하더라도 production scientific acceptance는 별도입니다. Rights-cleared full-length rehearsal audio로 decoder/resampler/downstream peak RSS/VRAM, cancellation latency, inherited handle/pipe return, abnormal-child cleanup, explicit CPU/GPU execution budgets와 recognized MIR reproducibility metrics를 측정해야 합니다. Synthetic/generated arrays는 unit boundary에만 사용합니다.
UI Delivery Gate: FAIL / Commercial Release Gate: FAIL. Signing/notarization, immutable release, SBOM/provenance/reproducibility, updater rollback도 current Draft lineage에서는 완료되지 않았습니다.
Activity
seonghobae commentedon Sep 9, 2026
Residual after
ccda5980d8c40cab5a88c39148e19775c35e311d: stable caches missingseparation.duration_secondsnow fail closed, but this is not metadata-generation atomicity. The outer API retains the first metadata snapshot while archive admission performs a second read, so first-read/second-read replacement remains in scope for the immutable manifest/generation contract. Bind metadata + private NPZ replay bytes + #970-owned admitted-source digest/reference; do not add pathname/timestamp identity as a competing authority.seonghobae commentedon Sep 9, 2026
#866 current Resource Admission repair has advanced normally to exact
3476e31fa19df269efa6bbf6c767e539ce81335con protecteddevelop@314ddeae7b775a4957594b599358c8255617eb2e.Fresh parser finding: persisted feature-cache JSON could contain duplicate object member names and Python's ordinary dictionary materialization could collapse them before semantic admission. RED
c7721839fb31dcb6cb5720f03bf24ee73250b05bcovers duplicate top-levelschemaVersionand nestedseparation.duration_seconds. Production10f7a369ef1277d8a50e6db2a80047185b35a6afuses oneobject_pairs_hookto reject duplicate members at every JSON object depth; the existing boundedValueErrorpath turns the sidecar into a cache miss. Doctoring/current descendant3476e31fa19df269efa6bbf6c767e539ce81335crecords RFC 8259/Python parser rationale and rejected first/last-wins alternatives.This closes duplicate-member representation ambiguity only. It does not bind the first metadata snapshot, private NPZ snapshot, and native verified source digest into one immutable generation. The versioned manifest/generation remains the next persistence prerequisite. Hosted RED and exact-head Python GREEN are not claimed yet; #1176 remains sole owner of the inherited protected-base Ruff formatter prerequisite.
seonghobae commentedon Sep 9, 2026
Fresh exact-head authority for canonical #866 remains
9bba38562b7827edeac0e5c6c82a0b992fc3ced5on protecteddevelop@314ddeae7b775a4957594b599358c8255617eb2e.Repository
cirun34386371232, job102583699528, has now been read at raw-log level. It passes docs/Security Notes/security-pattern/supply-chain/GitHub-bootstrap/workspace ESLint/Python docstrings anduv run ruff check src tests, then repository-pinned Ruff 0.15.5 fails only atruff format --check src testsfor the five #866-owned files already named in this issue; pytest is not reached.test_supply_chain_policy.pyis confirmed out of the failure set after the ordinary #1176 ancestry adoption. A canonical existing-branch OpenCode repair has been requested for those five files only; no competing PR, self-modifying formatter workflow, rebase/force-push, or gate weakening is being used.CodeQL is a separate central-owner condition, not a BandScope source finding. Run
34386371122successfully dispatches exact-head scans, then compatibility shards fail closed only because authenticatedcodeql-dispatch/<language>terminal verdicts remain pending. Fresh BandScope evidence has been handed toContextualWisdomLab/.github#1929; do not rerun the compatibility shards before a terminal owner verdict because their own attempt>1 contract rejects a rerun without that verdict.Current exact-head
build-baseline, SBOM, Security Scan, and SAST Semgrep are terminal-success. Keep #866 Draft until formatter repair reaches causal pytest evidence, central required gates are terminal, and a qualifying independent current-head approval exists.seonghobae commentedon Sep 9, 2026
Fresh Resource Admission authority update: canonical #866 is still exact
9bba38562b7827edeac0e5c6c82a0b992fc3ced5, Draft/open/mergeable on protecteddevelop@314ddeae7b775a4957594b599358c8255617eb2e. Raw exact-head CI reaches Ruff 0.15.5 and stops atruff format --check src testswith exactly five #866-owned files; pytest is not reached. A same-branch formatter-only repair has been dispatched with no gate weakening or foreign-file edits.Fresh overlap audit found #1197 (
48b58ab05fa02563e07c44069ff7300837168ee0) mixed three owners. It has been converted to Draft. Its uniqueprojectIdwhitespace admission regression is valid and must succeed into #866 after the formatter repair: current #866 rejects exact./..and separators but still admits leading/trailing whitespace. #1197'stest_supply_chain_policy.pyformatter delta remains #1176 ownership. Its setuptools CVE-2026-59890 floor is valid supply-chain work, but the current lock regeneration also drifts Torch 2.12.1→2.14.0 plus Triton/CUDA/cuDNN/NCCL; that ML-stack drift is not acceptable as incidental CVE repair and has been sent back for a minimal setuptools-only resolution if solvable. No #1197 checks/reviews transfer to #866.seonghobae commentedon Sep 9, 2026
2026-09-10 KST owner sweep: canonical #866 remains exact
9bba38562b7827edeac0e5c6c82a0b992fc3ced5, Draft/open, with repository CI still stopping before pytest at Ruff 0.15.5 formatting of the five Resource Admission-owned files already named in this issue. I re-dispatched only that formatter-equivalent repair on the existing #866 branch and separately requested an independent exact-head OpenCode verdict; no new source writer, retry commit, rebase, force-push, or gate bypass was created. Preservation authority was repaired in #985 so it no longer treats an old #866 Draft SHA or the now-implemented feature metadata/NPZ/source manifest as current truth; its unsuperseded M4A evidence remains preserved. #1194 authority was likewise refreshed to current #866 semantics and remains open until successor exact-head GREEN proves complete succession. Next causal source order remains: five-file Ruff descendant → first real pytest result → canonicalprojectIdwhitespace RED/fix from #1197 → final rehearsal-result generation binding.seonghobae commentedon Sep 11, 2026
Canonical live correction for #781: #866 is now exact
43938abaab610a67a1e68d5298d39849a8544fe7on protecteddevelop@314ddeae7b775a4957594b599358c8255617eb2e, not the olderceaca95f...state in the issue body. Ordinary descendants0b23a19...and43938...add focused traceback/path-leak regressions and the bounded traceback-free logging repair. Fresh hostedcirun34564617166, job103154639731passes docs/Security Notes/security-pattern/supply-chain/GitHub-bootstrap/docstrings and Ruff 0.15.5 check, then fails first at Ruff format only:src/bandscope_analysis/api.pywould be reformatted (1 file would be reformatted, 130 files already formatted). pytest/coverage therefore has not run on this exact head. The existing canonical writer has the exact pinned-formatter-only repair instruction; do not start a competing source writer. Producer/replay feature-cache admission symmetry remains the next semantic finding, then real Python 100%, then #1197 focusedprojectIdwhitespace succession.seonghobae commentedon Sep 22, 2026
Current-head evidence update for canonical #866: exact
7156aebd4a745cab4842d15aba319a72c80e1d98,resource-admission-process-output-nativerun35708793890is now terminal SUCCESS on both Windows Server 2025 and macOS 15. Both jobs passed the exact-limit dual-pipe contract, pinned npm/frontend prerequisite, and native TauriOwnedProcessadapter contract after the stale source-contract assertion repair. This re-establishes focused cross-platform evidence on the repaired head; it does not transfer predecessor broader results. Current broader state remains nonterminal: build-baseline35708793788in progress, repositoryci35708793852/ Security35708793924/ SBOM35708793840/ Semgrep35708793853queued, CodeQL PR35708793972pending. Keep Draft and do not merge/mark Ready until same-head broader settlement and independent non-author approval.seonghobae commentedon Sep 22, 2026
Current-head settlement update for canonical #866 exact
7156aebd4a745cab4842d15aba319a72c80e1d98:35708793890: SUCCESS;35708793788: SUCCESS;ci 35708793852: SUCCESS;35708793924: SUCCESS;35708793853: SUCCESS;35708793840: SUCCESS;35708793972: terminal FAILURE, but child RCA is the central delegated-CodeQL publication/settlement signature rather than a Resource Admission source finding.For CodeQL, detection
106734445522succeeded; actions/python/javascript-typescript compatibility jobs106801532499/106801532530/106801533519each read the current-head dispatch verdict successfully and then failed atRelease runner or enforce current-head CodeQL verdict; the later coordinator106855384749completed dispatch SUCCESS. The receiver log recordsVERDICT_STATE=pendingand expects the dispatch workflow to publish a terminal verdict and rerun the exact failed job, but the already-failed receivers did not later settle.This exact BandScope receipt has been routed to canonical central owner
ContextualWisdomLab/.github#1929as comment5783243533. #866 source stays stable; no no-op wake, blind broad rerun, synthetic status, copied scanner, or gate weakening. Independent qualifying current-head approval also remains absent, so #781/#866 stay Open/Draft.