Skip to content

Repair redaction damage that left a committed JS file unparseable - #952

Merged
loganfinney27 merged 1 commit into
mainfrom
claude/redaction-repair-qzt7le
Aug 12, 2026
Merged

Repair redaction damage that left a committed JS file unparseable#952
loganfinney27 merged 1 commit into
mainfrom
claude/redaction-repair-qzt7le

Conversation

@loganfinney27

@loganfinney27 loganfinney27 commented Aug 11, 2026

Copy link
Copy Markdown
Member

AGENT PR TEMPLATE

Agent: Claude Code (agent:claude-code)
Date: 2026-08-11
Branch: claude/redaction-repair-qzt7lemain


Changes Made

.codex/skills/codex-primary-runtime/slides/scripts/pro_deck_quality_check.js has never parsed. A redaction pass spliced its marker into the middle of 29 identifiers and the file was committed that way. node --check dies at line 112 with Unexpected token **.

Its only commit — 19a3ee6ad — already contains the damage, so there is no pre-redaction version in this repo's history to restore.

The original is recoverable from the file, not guessed

The removed substring is the literal rt_ in every case. Two survivors prove it:

Identifier Fate Why
chartNames (line 134) intact chart + N — no rt_
chartish_textbox_count (line 549) intact chart + ish — no rt_
chart_count, chart_parts, … damaged chart + _ — contains rt_

Everything of the form chart_ was hit; everything else containing chart was not. And line 138 assigns the damaged key straight from the surviving variable:

const chartNames = names.filter((name) => /^ppt\/(?:.*\/)?charts\/chart\d+\.xml$/.test(name)).sort();
result.chart_count = chartNames.length;   // was: result.cha***REMOVED***count

So the key names are read off the file's own logic, not inferred from convention. Same damage and same substring in .serena/project.ymlinsert_after_symbol and insert_before_symbol, which are Serena's actual tool names.

Why nothing caught it

check_redaction_damage.py is diff-based — --base and --head are required arguments — so it only inspects a PR's changed files. Damage that arrives in a file's first commit and is never touched again is invisible to it forever. That is a gap in the guard, not a failure of it; the guard does what it says.

Surfaced by ESLint in #950, which is the argument for turning these tools on: nothing else in the repo reads that file.

Not addressed here

161 other tracked files contain the marker, almost all .claude/ session state and backups where it is expected and harmless. These two are the only ones where it broke code.

Related Work

Blockers

  • None.

Checklist:

  • Tests pass (or no tests required) — no suite. Verified: node --check on the JS now passes (previously failed at 112); .serena/project.yml still parses via yaml.safe_load; 0 markers remain in either file; and grep -oE '\brt_[a-z_]*' finds no bare rt_ anywhere — every insertion merged back into an identifier rather than standing alone.
  • No secrets in diff — this removes a redaction marker from two files, restoring identifiers (chart_count, insert_after_symbol). Nothing sensitive is reintroduced: the eaten substring is rt_, and the surrounding names are ordinary code and documentation.
  • Documentation updated IF needed — the .serena change is a doc comment; the JS change is code.
  • Reviewer assigned — Logan.

Risk Level:

  • LOW: Single file fix, non-critical
  • MEDIUM: Multiple files, standard operation
  • HIGH: Core changes, requires human eyes

Two files. The JS goes from never-parsing to parsing, which can only widen what runs — worth a human glance at the reconstructed names even though the file grounds them.


Labels to apply:

  • agent:claude-code

https://claude.ai/code/session_01EBV6TkrwsZhcwkh1b6NUHs


Generated by Claude Code

Summary by Sourcery

Restore chart-related metrics and tool names that were corrupted by redaction so affected code and configuration parse correctly.

Bug Fixes:

  • Fix redaction-damaged chart metrics in pro_deck_quality_check.js so the script parses and reports chart data correctly.
  • Correct redaction-damaged Serena tool names in .serena/project.yml so documented symbol insertion tools match their actual identifiers.

Enhancements:

  • Align chart-related metric and sample field names for manual and native chart records to be consistent across inspect and pptx metrics.

pro_deck_quality_check.js has never parsed. A redaction pass spliced its
marker into the middle of 29 identifiers, and the file was committed that
way -- its only commit, 19a3ee6, already contains the damage, so there
is no pre-redaction version in this repo's history to restore.

The original text is recoverable anyway, from the file itself rather than
by guessing. The removed substring is the literal `rt_` in every case, and
two survivors prove it:

  chartNames              line 134, intact -- `chart` + `N`, no `rt_`
  chartish_textbox_count  line 549, intact -- `chart` + `ish`, no `rt_`

Everything of the form `chart_` was hit; everything else containing
`chart` was not. `result.chart_count = chartNames.length` on line 138 is
assigned from that surviving variable, and line 134's own regex matches
`charts/chart\d+\.xml`, so the key names are read off the file, not
inferred from convention.

Same damage, same substring, in .serena/project.yml: `insert_after_symbol`
and `insert_before_symbol`, which are Serena's actual tool names.

Verified: `node --check` on the JS now passes, where before it died at
line 112 with "Unexpected token **". The YAML still parses. 0 markers
remain in either file, and no bare `rt_` was introduced anywhere -- every
insertion merged back into an identifier.

Why nothing caught this: check_redaction_damage.py is diff-based
(`--base`/`--head` are required arguments), so it only inspects a PR's
changed files. Damage that arrives in a file's first commit and is never
touched again is invisible to it forever.

Not addressed here: 161 other tracked files contain the marker, almost all
of them .claude/ session state and backups where it is expected. These two
are the only ones where it broke code.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBV6TkrwsZhcwkh1b6NUHs
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@loganfinney27, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

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

How do review limits work?

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

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, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c0618fa0-9b25-4d24-8b5d-dacf1cb462a7

📥 Commits

Reviewing files that changed from the base of the PR and between c2d070e and ae357e1.

📒 Files selected for processing (2)
  • .codex/skills/codex-primary-runtime/slides/scripts/pro_deck_quality_check.js
  • .serena/project.yml

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.

@sourcery-ai

sourcery-ai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Reviewer's Guide

Repairs redaction damage in the deck quality-check script and Serena project config by restoring corrupted chart* and insert_*_symbol identifiers so both files parse and metrics/warnings line up correctly with their usage.

Flow diagram for repaired chart metrics and warnings in deck quality check script

flowchart TD
  A[inspectPptx]
  A --> B[pptxMetrics.chart_count]
  A --> C[pptxMetrics.chart_parts]

  D[inspectNdjson]
  D --> E[inspectMetrics.native_chart_record_count]
  D --> F[inspectMetrics.native_chart_record_samples]
  D --> G[inspectMetrics.manual_chart_textbox_count]
  D --> H[inspectMetrics.manual_chart_textbox_samples]
  D --> I[inspectMetrics.manual_chart_shape_count]
  D --> J[inspectMetrics.manual_chart_shape_samples]
  D --> K[inspectMetrics.chartish_textbox_count]
  D --> L[inspectMetrics.chartish_textbox_samples]

  M[main]
  B --> M
  C --> M
  E --> M
  F --> M
  G --> M
  H --> M
  I --> M
  J --> M
  K --> M
  L --> M

  M --> N[failures]
  M --> O[warnings]
Loading

File-Level Changes

Change Details Files
Restore redacted chart-related metric and sample identifiers in the PPTX/NDJSON inspection script so it parses and the metric names are consistent throughout.
  • Reconstruct chart_count and chart_parts fields in the PPTX metrics result object and their subsequent assignments based on chartNames.
  • Rename all manual_*, native_*, and related chart metrics in the NDJSON inspection results from redacted forms back to manual_chart_textbox_*, native_chart_record_*, and manual_chart_shape_*.
  • Update all uses of these metrics in failure/warning generation logic (manualChartRecordCount calculation, PPTX vs inspect consistency checks, and warning messages) to reference the restored identifiers and sample arrays.
.codex/skills/codex-primary-runtime/slides/scripts/pro_deck_quality_check.js
Fix Serena project configuration comments to reference the correct MCP tool names for symbol insertion.
  • Replace redaction-damaged inse***REMOVED***after_symbol and inse***REMOVED***before_symbol comment entries with the proper insert_after_symbol and insert_before_symbol tool names in the documented tool list.
.serena/project.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@loganfinney27 loganfinney27 added the risk/med Filetype: med (computer code — executes). label Aug 11, 2026
@codacy-production

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@loganfinney27
loganfinney27 marked this pull request as ready for review August 11, 2026 05:31
Copilot AI balanced review requested due to automatic review settings August 11, 2026 05:31
@tenki-reviewer

Copy link
Copy Markdown

Insufficient balance to process this code review. Please add funds or upgrade your plan in billing.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@qodo-code-review

Copy link
Copy Markdown
Contributor

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copilot AI 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.

Pull request overview

Restores redaction-damaged identifiers so the deck quality checker parses and Serena documentation names valid tools.

Changes:

  • Restores all chart_* metric identifiers and references.
  • Corrects Serena’s insert_after_symbol and insert_before_symbol names.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.serena/project.yml Repairs two tool names in configuration comments.
.codex/skills/codex-primary-runtime/slides/scripts/pro_deck_quality_check.js Repairs chart-related identifiers throughout the script.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@loganfinney27

Copy link
Copy Markdown
Member Author

PING!

@loganfinney27
loganfinney27 added this pull request to the merge queue Aug 12, 2026
Merged via the queue into main with commit 1a5f475 Aug 12, 2026
45 of 46 checks passed
@loganfinney27
loganfinney27 deleted the claude/redaction-repair-qzt7le branch August 12, 2026 02:48
@devactivity-app

Copy link
Copy Markdown

Pull Request Summary by devActivity

Metrics

Cycle Time: 21h 21m Comments: 2

Achievements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk/med Filetype: med (computer code — executes).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants