docs(backlog): file #1441, the WARNING+ PHI-filter bypass in non-serve CLI subcommands - #850
docs(backlog): file #1441, the WARNING+ PHI-filter bypass in non-serve CLI subcommands#850wshallwshall wants to merge 2 commits into
Conversation
…e CLI subcommands logging.lastResort carries filters=[] and formatter=None. Two of the CLI's 32 subcommands install a root handler (serve, supervise); the other 30 run with an empty root handler list, so their WARNING+ records reach stderr through lastResort and bypass the three filters _install_phi_filters puts on every configured handler. Measured with paired controls: a real `messagefoundry backup` run holds root.handlers == [] throughout and loads 18 WARNING+ traceback sites; the same record with configure_logging first comes out PID|[redacted]. Measured at 46ea10a and re-verified at a2eef0f, because main moved 58 commits in between and both measured files changed. The counts are unchanged. #1199's fix landed as 99887f5 (PR 820) in that window; it is per-logger, never appears in __main__.py, and does not close this gap. Files the item only. No fix: the item weighs both candidate remedies and records that remedy (1) empties caplog for the 6 test files that use it, of 40 asserting on captured CLI output. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ey-1cb72a # Conflicts: # docs/BACKLOG.md
|
This pull request is green and nobody has marked it read. Every check that has reported is passing and the To clear it, IN THIS ORDER:
DO NOT TRIAGE THIS FROM A seat can find every pull request in this state in one call: The |
Files BACKLOG #1441. Ledger row only -- no engine code changes, no test files.
The defect
logging.lastResortcarriesfilters=[]andformatter=None. Two of the CLI's 32 subcommands install a root logging handler (serve,supervise); the other 30 run with an empty root handler list, so the standard library services their records throughlastResort. That bypassesRedactionFilter,CredentialQueryScrubFilterandControlCharScrubFilter-- the three filterslogging_setup._install_phi_filtersputs on every configured handler.Stated in the conditional per CLAUDE.md section 0: there are zero deployments, so nothing is leaking. What is wrong is the code -- a PHI-safety control the
servepath has does not exist in 30 sibling processes.Measured, with controls
Every reading has a paired control that fires, so an absence is distinguishable from a clean result.
root.handlersmessagefoundry backuppath[]PIDsegment and full traceback verbatimconfigure_loggingfirst[StreamHandler]+ 3 filtersPID|[redacted]in message and tracebackA real
messagefoundry backuprun holdsroot.handlers == []throughout and loads 18 WARNING+ traceback sites. Negative control: 19 DEBUG/INFOexc_infosites are dropped, not leaked, becauselastResort.levelisWARNING.Synthetic HL7 only, per section 9.
Re-verified before landing
Measured at
46ea10a78, re-verified ata2eef0f37becausemainmoved 58 commits in between and both measured files changed (__main__.py+264,logging_setup.py+113). All counts unchanged.One claim did go stale in that window and was corrected rather than left standing: #1199's fix landed as
99887f5a4(#820) and an earlier draft said it was not onmain. Re-checked --ensure_logger_sinkis per-logger, never appears in__main__.py, and does not close this gap. The row records that as a method note.Scope
Files the item only. No fix, by instruction. The row weighs both candidate remedies and records honestly that remedy (1) -- configure logging in
main()-- emptiescaplogfor the 6 test files that use it, of 40 asserting on captured CLI output. Measured as a paired test.Checks run
ledger_check(with a firing negative control on an unallocated number),backlog_status_check,link_check, and the fullpre-commitset on the changed file. All pass. No test file added, sotests/tooling_manifest.txtdoes not apply.Number allocated atomically with
scripts/coord/alloc.ps1from this worktree.Related: #1054, #1055 (same class, both shipped), #1199 (same premise, opposite consequence).
🤖 Generated with Claude Code