Skip to content

Send each repeated skill/rule text once per report (WEB-6999) - #443

Merged
anonpran merged 2 commits into
stagingfrom
web-6999-dedup-skill-content
Nov 29, 2026
Merged

anonpran merged 2 commits into
stagingfrom
web-6999-dedup-skill-content

Conversation

@anonpran

@anonpran anonpran commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem

  • Git worktrees repeat the same skills and rules, so one Copilot Chat report reached 24 MB and the backend refused it (over the 15 MB cap), while the agent counted it as sent.
  • WEB-6999

Fix

  • send_report_to_backend puts every skill, rule or skill-folder-file text that appears more than once into tools[i].shared_contents and leaves a content_sha256 / head_sha256 ref in each entry. Texts that appear once stay inline, so reports without repeats are byte-identical to before.
  • The retry-queue copy stays expanded. The 14 MB folder guard is judged on the compact form. payload_hash is still the hash of the expanded tool.
  • The local unchanged-hash cache gets a one-time :shared suffix for these reports so devices whose oversized report was lost re-send.
  • Tests added to tests/test_skill_folder_upload.py.

Pairs with websentry-ai/ai-gateway-data#3601. Deploy the backend PR to prod before merging the agent PR (an old backend rejects shared_contents with "Unexpected fields in tool" and keeps existing rows).

🤖 Generated with Claude Code

Unbound Review · Score 5/5 (no findings) · d32fc7f

  • codex (own score 5/5): The PR compacts repeated skill, rule, and skill-folder text for upload while retaining expanded reports for hashing and retries. I found no actionable defects or rule violations in the changed paths.
  • claude (own score 5/5): When a skill, rule or skill-folder text repeats inside a tool report and sharing it makes the report smaller, the PR sends that text once in shared_contents and leaves a sha256 ref in each entry. The size guard is judged on the compact form, while payload_hash and the retry-queue copy stay based on the expanded tools. The local cache key gets a :shared suffix so reports that were lost before get sent again. I traced how the hash, the folder

findings: 0 P0 · 0 P1 · 0 P2 (top 5 P0/P1 inline) · engines: codex ✅ · claude ✅

rules applied: CLAUDE.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anonpran
anonpran requested a review from a team November 28, 2026 19:18

@vigneshsubbiah16 vigneshsubbiah16 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Security consensus: no issues found. (reviewers: Claude, Semgrep, Gitleaks)


🤖 consensus review · reviewers: Claude, Semgrep, Gitleaks · head 2bd667e5 · 2026-11-28T19:21Z

@anonpran

Copy link
Copy Markdown
Contributor Author

/review code

1 similar comment
@anonpran

Copy link
Copy Markdown
Contributor Author

/review code

…rt (WEB-6999)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anonpran

Copy link
Copy Markdown
Contributor Author

/review code

@vigneshsubbiah16 vigneshsubbiah16 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Security consensus: no issues found. (reviewers: claude, semgrep, gitleaks)


🤖 consensus review · reviewers: Claude, Semgrep, Gitleaks · head d32fc7ff · 2026-11-28T19:52Z

@anonpran
anonpran merged commit d1da488 into staging Nov 29, 2026
11 checks passed
anonpran added a commit that referenced this pull request Nov 29, 2026
…444)

* Send each repeated skill/rule text once per discovery report (WEB-6999)



* Keep short repeated texts inline when a ref would not shrink the report (WEB-6999)



---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.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.

4 participants