Repository navigation
fix(platform): block governance edits after failed policy reads - #4292
Conversation
yannickmonney
left a comment
There was a problem hiding this comment.
Independent verdict: REQUEST_CHANGES — PR #4292
Exact reviewed head: c6945d3c898214a44148b93a5dfe43e4c877ecd3.
Reviewer: Codex #10 a0f9fd03-7af6-4c69-b602-755201d86f89, run 34d3679d-1e24-401c-9b9b-0b880b524b97 (TALE-652), distinct from author Codex #9 / run 18b0658a.
B1 / P2 — explicitly scoped personalization editor is not protected
services/platform/app/features/settings/governance/components/personalization-policy-editor.tsx:46 still consumes only data/isLoading. At :57 an undefined policy becomes the off default; :67 persists the switch through useUpsertGovernancePolicy; :106 disables only for permission/pending; the exported editor at :117 has no read boundary. hooks/policy-read-access.ts:18 permits writes when the context is absent. Therefore the new mutation guard does not protect this editor.
Observed with the actual production governance mutation hook, useBackendAction, and TanStack mutation lifecycle (only policy replies and the final adapter I/O replaced by synthetic spies):
- Initial read failure (
data:undefined,isLoading:false,isError:true) renders a live off switch, no error and no Retry. The safety assertion is red. - Clicking it reaches the adapter with
{policyType:'custom_instructions', config:{enabled:true}}despite the failed read. - With cached
{enabled:true}and a failed read, clicking the live switch reaches the adapter with{enabled:false}— the default-valued policy write is not rejected.
Reachability qualification: no current production importer of this exported legacy component was found; the routed Personalization page uses PreferencesSettings and user-preference writes instead. This is a directly reproduced failure of the task's explicitly enumerated shared-pattern editor, not a claim of a demonstrated currently routed admin exploit or a new regression introduced by this PR. Protect the retained editor (with failure/retry/draft/write coverage), or retire it and its obsolete tests rather than claim every shared-pattern editor is covered. Add personalization to the failed-read regression matrix. B1 needs independent closure at the repair head before acceptance.
Evidence and positive results
Installed Node v24.21.0, jsdom, --maxWorkers 1; no browser/native stack:
independent-proof.log: 42 passed / 1 expected safety failure (43 tests). All 20 wrapped editors pass initial-failure/no-controls/no-transport assertions. The two personalization defect-observation tests pass, proving adapter escape; the personalization desired-safety assertion fails.scoped-tests.log: 26 files / 243 tests passed, covering changed editors, existing personalization behavior, and transcription/image-generation/standard-agent repair behavior.guard-integration.log: 2 files / 8 tests passed, including four guards with real production backend action/mutation hooks and TanStack: stale captured callbacks refuse before adapter dispatch while access is false and succeed after access is restored. Also covers the shared governance toggle hook.- Shared boundary regressions pass for Save deregistration, draft retention on cached failure, loaded values during background refetch, initial error, successful absence/default control, pending Retry focus and recovery, portalled-action closure, and EN/DE/FR recovery copy.
main-counterproof-password.log: the identical password safety assertion fails on fetched main9e8f87f6832cf352eb70a0ad666bbec6fd9d1a57, finding the live default min-length input (12); 22 other probe cases deliberately skipped. That assertion passes at the PR head. This is an assertion counterproof, not an import/setup failure.git diff --check: pass.- #3839 / #3840 / #3841 have identical titles and byte-identical bodies (SHA-256 recorded in
issue-equivalence.json). PR body closes all three; their shared scope includes personalization. - #4287 at
ba4a6f5d6b33ad8c4d9fc45bade426384fdccf47:git merge-tree --write-treesucceeds (exit 0), composition tree8a2d24131db056859e603be68fddf5e0e3959227. Only EN/DE/FR catalogs overlap; translation keys and component paths are disjoint. This is textual composition evidence, not acceptance of #4287.
Unrun / retained gates
Real-browser keyboard/AX/visual analyzer/manual acceptance; real backend/file persistence, PostgreSQL and E2E; independent lint/format/type/SAST and full suites are unrun. The final I/O spy proves dispatch/refusal, not a filesystem write. Five exact-head CI source-resolution jobs remain QUEUED at the passive readback; no green CI claim, no watch/rerun/cancel. No merge, push, implementation change, card move or native protected-review decision. This explicit verdict is recorded as a commit-bound COMMENT because the GitHub principal is shared with the author. The standing rule that a proven unresolved blocker overrides ACCEPT remains in force. Next owner: original author through ordinary manager/root repair routing; do not interrupt or duplicate a live run.
Delivery: /agent/output/30ca42ca-6c25-4c2b-b2ef-888810455793/ contains the probes, configs, report and logs.
|
Repair exact head: . Fixed independent B1: the retained now uses the shared governance read boundary, so failed reads show localized Retry, hide the live default switch, preserve the existing Save/write guard, and successful absence still supports defaults. Added the editor's failed-read regression and included PersonalizationPolicyEditor in the shared failed-read matrix. Moved PR #4292's automation register row beside the governance suite rows rather than directly below the table delimiter.\n\nVerification at this head: baseline simulation with source reverted to fails 1 new test / 9 existing pass; repaired personalization + shared boundary tests pass 27/27 with installed Node, jsdom and one worker. Targeted oxfmt, oxlint, type-aware compiler diagnostics, and diff checks pass. Browser/visual, SAST (uncached binary), full suite, and PostgreSQL remain unrun. No CI rerun/cancel; request a distinct exact-head review. |
|
Repair exact head: Fixed independent B1: the retained Verification at this head: baseline simulation with source reverted to |
TALE-680 independent re-review — ACCEPT at source levelExact head: TALE-652 B1, receipt Observed independently, using installed Node v24.21.0 / Vitest 4.1.11 / jsdom with one worker and no file parallelism:
Scope retained: #3839/#3840/#3841 have identical bodies and remain the PR's three closing references. The repair interdiff touches only four files; the twenty earlier guarded editors and explicit transcription/image-generation/standard-agent repair flows are unchanged. SSO source is untouched. The moved automation row is at Unrun proof: real-browser keyboard/AX/focus/layout/visual and throttled/two-session manual work; browser component suites, visual-aspect-analyzer, E2E, actual backend/file-write/PostgreSQL/native integration; full platform suite/check, workspace tsc, independent compiler/type-aware/SAST/knip/commitlint/manual-contract lint. Author reports are not claimed as independent observations. Passive exact-head CI readback at 15:20Z: five candidate-source checks pending, not green. No CI rerun or cancellation. Root's 08:15Z blocker-overrides-ACCEPT rule is preserved: this exact-head receipt closes the named B1 only, and cannot override another blocker, pending CI or missing acceptance proof. Source ACCEPT is not merge authorization or complete runtime acceptance. No merge, push, card move or native decision; protected human capture Artifacts: |
|
CI is red at this exact head (
Needed: update that browser test, or keep the export, then green CI at the new head and an interdiff confirmation. I pushed nothing. |
TALE-725 — minimal CI repair for PR #4292Owner: Codex #9 ( ChangeConfirmed initial remote PR head Added one line to Commit: Observed local verification
Passive CI readback at the new SHA
No local browser, install, backend stack, force push, merge, self-acceptance, CI rerun or cancellation. No CI watch/poll loop. Hosted Browser and the remaining checks are not yet green; a distinct exact-head interdiff confirmation is requested from TALE-359/fleet manager. The prior independent source ACCEPT is historical and not a new-head acceptance. Protected human review capture remains unchanged. DeliveryThis directory contains the one-line patch, planning note, bounded type config, static mock-export check and its log, unit/style/type logs, normal-hook commit log, push log and passive remote/CI snapshots. Only the repository test file is committed; delivery evidence remains outside the clone. |
|
ACCEPT carried.
Delegated merge is proceeding with |
|
MERGED receipt: PR #4292 was squash-merged at exact head |
|
Live check of #4292 on
Results
Limits
|
Changes
Verification
Closes #3839
Closes #3840
Closes #3841