3.0 KiB
3.0 KiB
Quiet successful automation-settings polling
Scope and gate
- Continuation of the user's request to keep normal polling quiet and errors visible. Production logs now show GET
/api/settings/automation200 start/completion pairs, approximately one minute apart in the sample. main,/Users/andy/IdeaProjects/LWLT-AIBOT, base4194a200c17ed51b3991aa5f86a8eff862b080c0; one worktree, tracked files clean. Preserve existing untracked.ideaand versioned plugin ZIP. Overlap: Clear.- Own
control-plane/src/server.ts,control-plane/test/diagnostics.test.tsand this task record. Main-thread work only. No.envreads, DB/ERP operations, production rollout, restart or external sending.
Finding and plan
- Administrator
refreshBackgroundStatecallssyncAutomationSettings; the page schedules background refresh every 30 seconds and on focus/visibility. The supplied production sample alone shows a 60-second interval; deployed version/background timer behavior may differ. - GET reads settings only; PUT changes automation settings. The previous exact quiet allowlist omitted the GET path.
- Add only GET/HEAD
/api/settings/automationto existing suppression: hide start/successful-2xx access logs, retain failed completions and PUT mutation logs. Verify actual handlers with stubbed dependencies, then run existing checks.
Validation and result
- Completed: added exact GET/HEAD
/api/settings/automationto the existing routine-polling classifier. Only the start log and successful 2xx completion log are suppressed. PUT and all failure/completion diagnostics remain unchanged. No browser polling interval or automation behavior changed. - Focused diagnostics tests 10/10 PASS: actual GET/HEAD settings handlers run, successful reads produce no logs even at debug; 401/403/500 retain request-correlated status/severity/error diagnostics; PUT still invokes the settings method and records start/completion access logs. Dependencies are stubbed; no settings/database mutation occurred.
node --run check,node --run test:control-plane(227/227),node --run buildandgit diff --check: PASS. Originalcheck:reporemains 8/10 from pre-existing.idea/.DS_Storeresidue. A 2617-file byte-verified source copy excluding secrets/local metadata passescheck:repo10/10 andtest:legacy319/319; existing HTTP tests use permitted loopback listeners. A test assertion's TypeScript narrowing was corrected, then typecheck/build and the full control-plane suite reran successfully.- Main-thread final read-only review: PASS; only the two owned source/test files and this record changed. Temporary validation output:
/private/tmp/ltjt-automation-log-noise-20260914/. - Production has not been changed. A newly built service deployment is required for production suppression; no plugin update or database migration is needed.
Promotion candidates
- Include administrator automation-settings polling in the established quiet successful-read logging policy; shared canonical memory remains untouched.