Skip to content

Berickson/logging#241

Merged
bradley-erickson merged 7 commits into
masterfrom
berickson/logging
Nov 3, 2025
Merged

Berickson/logging#241
bradley-erickson merged 7 commits into
masterfrom
berickson/logging

Conversation

@bradley-erickson

Copy link
Copy Markdown
Collaborator

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +621 to +623
protocol_log_filename = "{timestamp}-{user:-<15}-{remote:-<15}-{counter:0>10}-{pid}.dashboard".format(
timestamp=datetime.datetime.utcnow().isoformat(),
user=(user_context.get('user_id') or 'UNKNOWN')[:15],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Slice user identifier after converting to string

The log filename uses (user_context.get('user_id') or 'UNKNOWN')[:15] to truncate the user identifier before writing a dashboard log. user_id comes from the session and is often an integer, so attempting to slice it raises TypeError: 'int' object is not subscriptable and aborts the websocket handler before any work is done. Convert the identifier to str() (and likewise any other non‑string values) before truncating so integer IDs don’t crash the handler.

Useful? React with 👍 / 👎.

@bradley-erickson

Copy link
Copy Markdown
Collaborator Author

@codex address adding more comments to our changes
Much of the functions are named properly to help self-document the code.

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

Testing

  • ⚠️ Not run (not requested)

View task →

@bradley-erickson bradley-erickson merged commit c84a348 into master Nov 3, 2025
1 of 2 checks passed
@bradley-erickson bradley-erickson deleted the berickson/logging branch March 10, 2026 12:38
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.

1 participant