Policies: enforce input on uploads only; badge follows edited files (#6627)

This commit is contained in:
Reece Browne
2026-06-11 21:27:44 +01:00
committed by GitHub
parent ef65e6b015
commit 6f1c19c179
8 changed files with 466 additions and 25 deletions
@@ -83,6 +83,11 @@ export function usePolicyAutoRun(): void {
);
for (const [categoryId, s] of active) {
for (const stub of fileStubs) {
// Input-mode policies enforce only on files that actually entered the
// system as an upload — not on files a tool/automation produced in-app
// (versioned edits or independent artifacts like convert/split/merge).
// Those are enforced only by export-mode policies, at export time.
if (stub.derivedFromTool) continue;
const key = dispatchKey(categoryId, stub.id);
// Skip if already run (persisted) or a dispatch is in flight — the
// in-memory guard prevents double-firing during the async wait.