Skip to content

[TH-9448] fix: no traceback at any log level when the browser scan skips a file - #291

Merged
khushalsonawat merged 2 commits into
feat/TH-8804-source-subfolderfrom
feat/TH-9448-no-debug-trace
Nov 11, 2026
Merged

khushalsonawat merged 2 commits into
feat/TH-8804-source-subfolderfrom
feat/TH-9448-no-debug-trace

Conversation

@khushalsonawat

Copy link
Copy Markdown
Member

Description

Follow-up to #288, answering Dileep's two comments there; #288 was merged before they could go in.

  • The DEBUG traceback (comment on agent_type_check.py:648) is fixed. The browser scan's skip handler logged the path with the full traceback at DEBUG. A tokenizer or parser trace can quote a line of the customer's source, so that was safe only while every hosted logger stays at INFO. Now:
    • DEBUG gets the path and the error type;
    • WARNING gets the type alone, once a scan;
    • no record at any level carries a traceback or the error's own text.
  • The sharing key (comment on :329) is not changed. See the reply on that thread. In short, mtime in the key stops exact copies of a vendored environment from sharing (measured: 9 of 21 copies get rows again, as before [TH-9448] fix: follow-ups from #224's last review of the browser-agent scan #288). A same-size patch to a vendored file can't share wrong rows, because only each RECORD's paths are kept. It stays a named known limit.

Type of Change

  • Bug fix

Testing

  • test_agent_type_refusal.py: 720 passed.
  • The plant (the trace put back at DEBUG) turns test_a_skip_logs_its_type_once_and_its_path_at_debug_only_with_no_trace red.
  • Two fresh reviewers were both CLEAR, with nothing above Low. One Low is recorded in the register: the parser's SyntaxWarnings on stderr carry an escape and a line number, never a line or a path.

Related Issues

Refs: TH-9448

…ps a file (TH-9448)

Dileep's review of #288: the skip handler still logged the path with the full
traceback at DEBUG, and a tokenizer or parser trace can quote a line of the
customer's source. That is safe only while every hosted logger stays at INFO.

The handler now logs the path and the error type at DEBUG, and the type alone
at WARNING once a scan, as _python_markers already does. The skip test asserts
that no record at any level carries a traceback or the error's own text.

Reviewed by two fresh reviewers, both CLEAR.

Refs: TH-9448
Signed-off-by: khushalsonawat <khushalsonawat@gmail.com>
@khushalsonawat khushalsonawat self-assigned this Nov 11, 2026
…nto feat/TH-9448-no-debug-trace

Signed-off-by: khushalsonawat <khushalsonawat@gmail.com>
@khushalsonawat
khushalsonawat merged commit 2ea884f into feat/TH-8804-source-subfolder Nov 11, 2026
11 checks passed
@khushalsonawat
khushalsonawat deleted the feat/TH-9448-no-debug-trace branch November 11, 2026 12:48
khushalsonawat added a commit that referenced this pull request Nov 11, 2026
…the-parse-total

agent_type_check.py, the skip handler: #291 drops the trace at every level; this branch
counts a skip as the skipped cut. Kept both: no trace, the type once at WARNING, the count
in the cut line.

Signed-off-by: khushalsonawat <khushalsonawat@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants