fix(cli)/chore(ai): predb tag extension, UNIT3D retry loop, TOS unattended messages, ai stuff #249

Merged
yippee0903 merged 4 commits from fix/bd-issues into master 2026-06-18 18:20:56 +00:00
yippee0903 commented 2026-06-18 18:10:37 +00:00 (Migrated from github.com)
  • is_scene.py: strip file extension from predb scene_name and group before
    storing in meta. predb stores releases including the container extension
    (e.g. BYNDR.mkv), which leaked into meta["tag"] and from there into the
    C411 release name, causing "Le nom de release ne doit pas contenir
    d'extension de fichier" validation errors. (closes Upload-Assistant-a3n)

  • UNIT3D.py: add return False after HTTP 401/404/422 in the upload retry
    loop. These status codes indicate terminal data-validation errors that
    cannot succeed on retry; without the early return the loop continued to
    the next attempt, wasting a request and producing confusing output.
    (closes Upload-Assistant-8ix, Upload-Assistant-1gf, Upload-Assistant-p15)

  • TOS.py: guard bitrate-error console.print calls with
    not meta.get("unattended"). The error messages were printed unconditionally
    before the unattended check, so they appeared even in fully automated runs.
    (closes Upload-Assistant-lez)

  • AI stuff

Summary by CodeRabbit

  • Documentation

    • Added agent skills and domain knowledge structure documentation
    • Added comprehensive issue tracking workflow and triage label guides
  • Bug Fixes

    • Improved media file extension normalization in scene metadata extraction
    • Refined validation messaging behavior for unattended uploads
    • Fixed control flow in tracker error handling responses
  • Chores

    • Updated .gitignore with additional directory exclusion
- is_scene.py: strip file extension from predb scene_name and group before storing in meta. predb stores releases including the container extension (e.g. BYNDR.mkv), which leaked into meta["tag"] and from there into the C411 release name, causing "Le nom de release ne doit pas contenir d'extension de fichier" validation errors. (closes Upload-Assistant-a3n) - UNIT3D.py: add return False after HTTP 401/404/422 in the upload retry loop. These status codes indicate terminal data-validation errors that cannot succeed on retry; without the early return the loop continued to the next attempt, wasting a request and producing confusing output. (closes Upload-Assistant-8ix, Upload-Assistant-1gf, Upload-Assistant-p15) - TOS.py: guard bitrate-error console.print calls with not meta.get("unattended"). The error messages were printed unconditionally before the unattended check, so they appeared even in fully automated runs. (closes Upload-Assistant-lez) - AI stuff <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added agent skills and domain knowledge structure documentation * Added comprehensive issue tracking workflow and triage label guides * **Bug Fixes** * Improved media file extension normalization in scene metadata extraction * Refined validation messaging behavior for unattended uploads * Fixed control flow in tracker error handling responses * **Chores** * Updated `.gitignore` with additional directory exclusion <!-- end of auto-generated comment: release notes by coderabbit.ai -->
coderabbitai[bot] commented 2026-06-18 18:10:57 +00:00 (Migrated from github.com)

Review Change Stack

Warning

Review limit reached

@yippee0903, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 52 minutes and 1 second. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2eb24c28-d81f-4c18-ba69-13e889ca42ec

📥 Commits

Reviewing files that changed from the base of the PR and between ffa72fd251 and e5492dae66.

📒 Files selected for processing (2)
  • src/trackers/TOS.py
  • src/trackers/ULCX.py
📝 Walkthrough

Walkthrough

Three independent bug fixes: predb_check now strips media file extensions from the release attribute and group text before storing scene name and tag metadata; TOS suppresses bitrate-low console messages for unattended uploads; UNIT3D adds an early return False after HTTP error status handling. Additionally, new agent guidance documentation and a .gitignore entry are added.

Changes

Source Code Bug Fixes

Layer / File(s) Summary
Scene name and group extension stripping
src/is_scene.py
predb_check splits release_attr into root and extension, storing the root in meta["scene_name"] when the extension matches common video/NFO types. The same stripping is applied to the parsed group text before constructing meta["tag"].
TOS unattended logging and UNIT3D early return
src/trackers/TOS.py, src/trackers/UNIT3D.py
TOS wraps the two bitrate-too-low console.print calls in a not meta.get("unattended", False) guard; bitrate error flagging is unchanged. UNIT3D adds return False immediately after setting the tracker status message for HTTP 401/404/422 responses.

Agent Guidance Documentation

Layer / File(s) Summary
Agent skills docs and ignore entry
CLAUDE.md, docs/agents/domain.md, docs/agents/issue-tracker.md, docs/agents/triage-labels.md, .gitignore
CLAUDE.md gains an Agent skills section specifying the bd/Beads workflow, triage labels, and domain-doc layout. Three new docs/agents/ pages document domain-doc consumption rules, bd CLI commands and workflow, and the five canonical triage label mappings. .gitignore adds graphify-out/.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • yippee0903/Upload-Assistant#53: Modifies TOS.get_additional_checks around the same bitrate validation block, specifically how bitrate failures and unattended upload messaging are handled.
🚥 Pre-merge checks | 3 | 2

Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check Inconclusive The title is vague and unfocused, listing multiple unrelated changes with 'ai stuff' as a catch-all placeholder rather than clearly summarizing the main changeset. Revise the title to focus on the primary change or use a more descriptive format like 'fix: multiple issues in predb, UNIT3D, and TOS' and address AI changes in a separate PR or commit with clearer messaging.
Passed checks (3 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/bd-issues

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

<!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/yippee0903/Upload-Assistant/pull/249?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- This is an auto-generated comment: rate limited by coderabbit.ai --> > [!WARNING] > ## Review limit reached > > `@yippee0903`, we couldn't start this review because you've reached your PR review rate limit. > > More reviews will be available in 52 minutes and 1 second. [Learn how PR review limits work](https://docs.coderabbit.ai/management/plans#fair-usage-limits-policy). > > Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the **review add-on** in the [billing tab](https://app.coderabbit.ai/settings/billing?tab=usage&orgId=eaa0908c-6035-4950-8a28-f8ec6fe501df) to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). > > <details> > <summary>⌛ How to resolve this issue?</summary> > > After more reviews become available, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. > > To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. > > </details> > > > <details> > <summary>🚦 How do rate limits work?</summary> > > CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. > > For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. > > Please see our [Fair Usage Limits Policy](https://docs.coderabbit.ai/management/plans#fair-usage-limits-policy) for further information. > > </details> > > <details> > <summary>ℹ️ Review info</summary> > > <details> > <summary>⚙️ Run configuration</summary> > > **Configuration used**: Path: .coderabbit.yaml > > **Review profile**: CHILL > > **Plan**: Pro > > **Run ID**: `2eb24c28-d81f-4c18-ba69-13e889ca42ec` > > </details> > > <details> > <summary>📥 Commits</summary> > > Reviewing files that changed from the base of the PR and between ffa72fd25117cf0dab249e9b3d418657011190f9 and e5492dae66e166ee35891c5285a1819e7766ec17. > > </details> > > <details> > <summary>📒 Files selected for processing (2)</summary> > > * `src/trackers/TOS.py` > * `src/trackers/ULCX.py` > > </details> > > </details> <!-- end of auto-generated comment: rate limited by coderabbit.ai --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough Three independent bug fixes: `predb_check` now strips media file extensions from the release attribute and group text before storing scene name and tag metadata; TOS suppresses bitrate-low console messages for unattended uploads; UNIT3D adds an early `return False` after HTTP error status handling. Additionally, new agent guidance documentation and a `.gitignore` entry are added. ## Changes **Source Code Bug Fixes** | Layer / File(s) | Summary | |---|---| | **Scene name and group extension stripping** <br> `src/is_scene.py` | `predb_check` splits `release_attr` into root and extension, storing the root in `meta["scene_name"]` when the extension matches common video/NFO types. The same stripping is applied to the parsed group text before constructing `meta["tag"]`. | | **TOS unattended logging and UNIT3D early return** <br> `src/trackers/TOS.py`, `src/trackers/UNIT3D.py` | TOS wraps the two bitrate-too-low `console.print` calls in a `not meta.get("unattended", False)` guard; bitrate error flagging is unchanged. UNIT3D adds `return False` immediately after setting the tracker status message for HTTP 401/404/422 responses. | **Agent Guidance Documentation** | Layer / File(s) | Summary | |---|---| | **Agent skills docs and ignore entry** <br> `CLAUDE.md`, `docs/agents/domain.md`, `docs/agents/issue-tracker.md`, `docs/agents/triage-labels.md`, `.gitignore` | `CLAUDE.md` gains an Agent skills section specifying the `bd`/Beads workflow, triage labels, and domain-doc layout. Three new `docs/agents/` pages document domain-doc consumption rules, `bd` CLI commands and workflow, and the five canonical triage label mappings. `.gitignore` adds `graphify-out/`. | ## Estimated code review effort 🎯 2 (Simple) | ⏱️ ~10 minutes ## Possibly related PRs - [yippee0903/Upload-Assistant#53](https://github.com/yippee0903/Upload-Assistant/pull/53): Modifies `TOS.get_additional_checks` around the same bitrate validation block, specifically how bitrate failures and unattended upload messaging are handled. </details> <!-- walkthrough_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary>🚥 Pre-merge checks | ✅ 3 | ❌ 2</summary> ### ❌ Failed checks (1 warning, 1 inconclusive) | Check name | Status | Explanation | Resolution | | :----------------: | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. | | Title check | ❓ Inconclusive | The title is vague and unfocused, listing multiple unrelated changes with 'ai stuff' as a catch-all placeholder rather than clearly summarizing the main changeset. | Revise the title to focus on the primary change or use a more descriptive format like 'fix: multiple issues in predb, UNIT3D, and TOS' and address AI changes in a separate PR or commit with clearer messaging. | <details> <summary>✅ Passed checks (3 passed)</summary> | Check name | Status | Explanation | | :------------------------: | :------- | :----------------------------------------------------------------------- | | Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. | | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | </details> <sub>✏️ Tip: You can configure your own custom pre-merge checks in the settings.</sub> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- finishing_touch_checkbox_start --> <details> <summary>✨ Finishing Touches</summary> <details> <summary>🧪 Generate unit tests (beta)</summary> - [ ] <!-- {"checkboxId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Create PR with unit tests - [ ] <!-- {"checkboxId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Commit unit tests in branch `fix/bd-issues` </details> </details> <!-- finishing_touch_checkbox_end --> <!-- tips_start --> --- Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=yippee0903/Upload-Assistant&utm_content=249)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary>❤️ Share</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </details> <sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub> <!-- tips_end -->
coderabbitai[bot] (Migrated from github.com) reviewed 2026-06-18 18:14:04 +00:00
coderabbitai[bot] (Migrated from github.com) left a comment

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/trackers/TOS.py (1)

519-536: ⚠️ Potential issue | 🟡 Minor | Quick win

Complete unattended suppression for all bitrate-error prints.

The new guard covers only the low-bitrate message path (Line 534-536), but bitrate-error prints at Line 520 and Line 530 still log during unattended runs. That leaves the same noisy behavior for “could not determine bitrate” failures.

Suggested patch
                 if video_track is None:
-                    console.print(f"[bold red]Could not determine video bitrate from mediainfo for {self.tracker} upload.[/bold red]")
+                    if not meta.get("unattended", False):
+                        console.print(f"[bold red]Could not determine video bitrate from mediainfo for {self.tracker} upload.[/bold red]")
                     bitrate_error = True
                 else:
                     raw_br = video_track.get("BitRate")
@@
                     if bit_rate_kbps is None:
-                        console.print(f"[bold red]Could not determine video bitrate from mediainfo for {self.tracker} upload.[/bold red]")
+                        if not meta.get("unattended", False):
+                            console.print(f"[bold red]Could not determine video bitrate from mediainfo for {self.tracker} upload.[/bold red]")
                         bitrate_error = True
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/trackers/TOS.py` around lines 519 - 536, The unattended suppression guard
is only applied to the low-bitrate console.print statements (lines 534-536), but
the two earlier bitrate error messages are still being printed during unattended
runs. Wrap both console.print statements that output "Could not determine video
bitrate from mediainfo" messages with the same `if not meta.get("unattended",
False):` guard that is already being used for the low-bitrate error messages.
Apply this guard to the print statement when video_track is None and again when
bit_rate_kbps is None after the parsing attempt.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/trackers/TOS.py`:
- Around line 519-536: The unattended suppression guard is only applied to the
low-bitrate console.print statements (lines 534-536), but the two earlier
bitrate error messages are still being printed during unattended runs. Wrap both
console.print statements that output "Could not determine video bitrate from
mediainfo" messages with the same `if not meta.get("unattended", False):` guard
that is already being used for the low-bitrate error messages. Apply this guard
to the print statement when video_track is None and again when bit_rate_kbps is
None after the parsing attempt.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4155d154-cca9-48c8-ace3-82d53ae6b921

📥 Commits

Reviewing files that changed from the base of the PR and between a70bc314cd and ffa72fd251.

📒 Files selected for processing (8)
  • .gitignore
  • CLAUDE.md
  • docs/agents/domain.md
  • docs/agents/issue-tracker.md
  • docs/agents/triage-labels.md
  • src/is_scene.py
  • src/trackers/TOS.py
  • src/trackers/UNIT3D.py
> [!CAUTION] > Some comments are outside the diff and can’t be posted inline due to platform limitations. > > > > <details> > <summary>⚠️ Outside diff range comments (1)</summary><blockquote> > > <details> > <summary>src/trackers/TOS.py (1)</summary><blockquote> > > `519-536`: _⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ > > **Complete unattended suppression for all bitrate-error prints.** > > The new guard covers only the low-bitrate message path (Line 534-536), but bitrate-error prints at Line 520 and Line 530 still log during unattended runs. That leaves the same noisy behavior for “could not determine bitrate” failures. > > > > <details> > <summary>Suggested patch</summary> > > ```diff > if video_track is None: > - console.print(f"[bold red]Could not determine video bitrate from mediainfo for {self.tracker} upload.[/bold red]") > + if not meta.get("unattended", False): > + console.print(f"[bold red]Could not determine video bitrate from mediainfo for {self.tracker} upload.[/bold red]") > bitrate_error = True > else: > raw_br = video_track.get("BitRate") > @@ > if bit_rate_kbps is None: > - console.print(f"[bold red]Could not determine video bitrate from mediainfo for {self.tracker} upload.[/bold red]") > + if not meta.get("unattended", False): > + console.print(f"[bold red]Could not determine video bitrate from mediainfo for {self.tracker} upload.[/bold red]") > bitrate_error = True > ``` > </details> > > <details> > <summary>🤖 Prompt for AI Agents</summary> > > ``` > Verify each finding against current code. Fix only still-valid issues, skip the > rest with a brief reason, keep changes minimal, and validate. > > In `@src/trackers/TOS.py` around lines 519 - 536, The unattended suppression guard > is only applied to the low-bitrate console.print statements (lines 534-536), but > the two earlier bitrate error messages are still being printed during unattended > runs. Wrap both console.print statements that output "Could not determine video > bitrate from mediainfo" messages with the same `if not meta.get("unattended", > False):` guard that is already being used for the low-bitrate error messages. > Apply this guard to the print statement when video_track is None and again when > bit_rate_kbps is None after the parsing attempt. > ``` > > </details> > > <!-- cr-comment:v1:bfd024ce83ae177e58e9c62a --> > > </blockquote></details> > > </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary> ``` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Outside diff comments: In `@src/trackers/TOS.py`: - Around line 519-536: The unattended suppression guard is only applied to the low-bitrate console.print statements (lines 534-536), but the two earlier bitrate error messages are still being printed during unattended runs. Wrap both console.print statements that output "Could not determine video bitrate from mediainfo" messages with the same `if not meta.get("unattended", False):` guard that is already being used for the low-bitrate error messages. Apply this guard to the print statement when video_track is None and again when bit_rate_kbps is None after the parsing attempt. ``` </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Path: .coderabbit.yaml **Review profile**: CHILL **Plan**: Pro **Run ID**: `4155d154-cca9-48c8-ace3-82d53ae6b921` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between a70bc314cdb88420090ab1de8880ab006250863b and ffa72fd25117cf0dab249e9b3d418657011190f9. </details> <details> <summary>📒 Files selected for processing (8)</summary> * `.gitignore` * `CLAUDE.md` * `docs/agents/domain.md` * `docs/agents/issue-tracker.md` * `docs/agents/triage-labels.md` * `src/is_scene.py` * `src/trackers/TOS.py` * `src/trackers/UNIT3D.py` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
coderabbitai[bot] (Migrated from github.com) reviewed 2026-06-18 18:14:07 +00:00
Sign in to join this conversation.
No description provided.