Skip to content

fix(deploy): keep the secret-placeholder token out of spec prose - #301

Merged
elstonyth merged 1 commit into
masterfrom
fix/do-apply-comment-placeholder
Jul 30, 2026
Merged

fix(deploy): keep the secret-placeholder token out of spec prose#301
elstonyth merged 1 commit into
masterfrom
fix/do-apply-comment-placeholder

Conversation

@elstonyth

@elstonyth elstonyth commented Jul 30, 2026

Copy link
Copy Markdown
Owner

#300 broke do-apply with a comment. The script's last guard greps the whole spec text — comments included — for the redacted-secret token, so writing it in prose was enough to abort every backend deploy:

pwsh scripts/do-apply.ps1 backend -Validate
-> Unresolved secret placeholder remains — aborting (would push a redacted secret to prod)

Reworded the comment, and it now states the constraint so the next person doesn't repeat it.

Verification

  • pwsh scripts/do-apply.ps1 backend -Validate"Validation OK (no live change)", i.e. DigitalOcean accepted the resolved spec.
  • Exactly 10 occurrences of the token remain — the ten real placeholders, no prose.
  • PRICECHARTING_SELLER_ID from chore(deploy): configure PRICECHARTING_SELLER_ID in prod #300 is untouched and still a plain value.

Note: no prod change has been applied yet. do-apply.ps1 backend (without -Validate) is what pushes the spec and redeploys, and that's a deliberate operator step.

🤖 Generated with Claude Code

Summary by Sourcery

Clarify backend deployment spec comments to prevent the secret placeholder token from appearing in prose and breaking deploy validation.

Bug Fixes:

  • Prevent backend deploy validation from failing by removing the literal secret-placeholder token from spec comments.

Deployment:

  • Update DigitalOcean backend app spec comment around PRICECHARTING user ID to describe the non-secret value without using the redacted-secret placeholder token.

#300 added a comment that spelled the redacted-secret placeholder token
literally. do-apply.ps1's final guard greps the WHOLE spec text — comments
included — for that token and aborts, so the prose alone was enough to block
every backend deploy:

  pwsh scripts/do-apply.ps1 backend -Validate
  -> Unresolved secret placeholder remains - aborting

Reworded, and the comment now says why the token must never appear in prose.
`pwsh scripts/do-apply.ps1 backend -Validate` passes again ("Validation OK"),
with exactly the ten real placeholders left in the file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Comment in the DigitalOcean backend app spec was reworded to avoid using the secret-placeholder token in prose, ensuring the deployment validation script no longer falsely detects an unresolved secret while preserving the actual secret placeholder and non-secret value configuration.

Sequence diagram for backend spec validation avoiding secret placeholder in comments

sequenceDiagram
  actor Operator
  participant do_apply_ps1 as do_apply.ps1
  participant BackendSpec as backend.app.yaml
  participant grep

  Operator->>do_apply_ps1: backend -Validate
  do_apply_ps1->>BackendSpec: load_spec
  do_apply_ps1->>grep: search __SECRET__ tokens
  grep-->>do_apply_ps1: [no placeholder token found in comments]
  do_apply_ps1-->>Operator: Validation OK (no live change)
Loading

File-Level Changes

Change Details Files
Reworded PriceCharting-related environment variable comment to avoid the secret-placeholder token in prose while documenting the deployment constraint.
  • Updated comment explaining that PRICECHARTING_SELLER_ID is a plain, non-secret value
  • Clarified that do-apply.ps1 scans the entire spec, including comments, for the redacted-secret placeholder token
  • Documented that the literal secret-placeholder token must not appear in prose to prevent false aborts during validation
.do/backend.app.yaml

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

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2702c03f-abb7-42c7-8351-f83401fb1c02

📥 Commits

Reviewing files that changed from the base of the PR and between e9f4b0b and dfc20eb.

📒 Files selected for processing (1)
  • .do/backend.app.yaml

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

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.

@elstonyth
elstonyth merged commit 5ec3fc6 into master Jul 30, 2026
14 checks passed
@elstonyth
elstonyth deleted the fix/do-apply-comment-placeholder branch July 30, 2026 09:39
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