Skip to content

Add support-qa-toolkit v1 - #1

Merged
dkupratis-debug merged 1 commit into
mainfrom
cursor/support-qa-toolkit-v1-ee63
Nov 11, 2026
Merged

dkupratis-debug merged 1 commit into
mainfrom
cursor/support-qa-toolkit-v1-ee63

Conversation

@dkupratis-debug

@dkupratis-debug dkupratis-debug commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds a small local CLI for the support-to-QA workflow. sqt ticket2bug turns a plain-text or JSON ticket into a Markdown bug report (summary, environment, steps, expected vs actual, severity with the rule that fired, and open questions). sqt triage summarizes an application log: error counts by type, first and last seen, 5-minute spikes, and repeated issues.

The rules are documented in src/sqt/severity.py and src/sqt/logs.py. There is no language model and no network call. Sample tickets and logs are fictional (a made-up app called Paperlane).

Also included: pytest coverage of both commands and the empty/malformed/unknown-format edges, a sqt console script, a Python .gitignore, the MIT license (Copyright 2026 David Kupratis), and a GitHub Actions workflow that runs ruff and pytest on push and pull request.

Try it

pip install -e ".[dev]"
sqt ticket2bug samples/tickets/export-hang.txt
sqt triage samples/logs/api-morning.log

Bad input exits 2 with an sqt: line on stderr rather than a traceback.

Tests

ruff check . is clean. pytest reports 57 passed, locally on Python 3.11 and 3.12.

Open in Web Open in Cursor 

Rule-based ticket-to-bug and log triage commands, fictional Paperlane
samples, pytest coverage, and a ruff/pytest GitHub Actions workflow.

Co-authored-by: David Kupratis <dkupratis@student.bccc.edu>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T16:26:42.732173Z 61f8e1d PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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.

Reviewed commit: 61f8e1d17c

ℹ️ 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 thread src/sqt/tickets.py

def parse_json_ticket(text: str) -> Ticket:
try:
data = json.loads(text)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Strip the detected BOM before decoding a JSON ticket

For a UTF-8 JSON ticket with a byte-order mark, parse_ticket strips the BOM when detecting the format but then passes the original text here. Consequently, json.loads rejects an otherwise valid ticket with Unexpected UTF-8 BOM, and ticket2bug exits 2 instead of producing a report. Pass the normalized text to the JSON parser or remove the leading BOM before decoding, consistent with the existing handling of plain-text tickets.

Useful? React with 👍 / 👎.

Comment thread src/sqt/logs.py
Comment on lines +60 to +63
_ERROR_TYPE_RE = re.compile(
r"\berror[_ ]?type=(\"[^\"]+\"|'[^']+'|[A-Za-z_][A-Za-z0-9_]*)",
re.IGNORECASE,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Recognize explicit exception fields in text logs

For recognized text log lines containing exception=JobFailed, the explicit exception field is ignored because this expression only accepts error_type, while the fallback exception expression requires a name ending in Error, Exception, or Fault. This contradicts the documented precedence of explicit error_type or exception fields and corrupts grouping: three lines with distinct exceptions such as JobFailed, QueueFull, and WorkerStopped, all with message="operation failed", become one repeated issue. Include exception in the explicit-field matcher so those counts and repeat decisions remain separate.

Useful? React with 👍 / 👎.

@dkupratis-debug
dkupratis-debug merged commit f75a3bd into main Nov 11, 2026
2 checks passed
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