Skip to content

cleanup#144

Closed
mikepsinn wants to merge 8 commits into
mainfrom
feature/cleanup
Closed

cleanup#144
mikepsinn wants to merge 8 commits into
mainfrom
feature/cleanup

Conversation

@mikepsinn

@mikepsinn mikepsinn commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Housekeeping pass:

  • Remove the docs/archive/ folder of historical planning docs (per repo policy, working/planning docs belong in Notion, not the repo). The one file read at runtime by the fix-ai feature (canonical-argument-2026-05-20.md) is relocated to docs/, where the loader already had a fallback path; fix-ai-content test passes against the new location.
  • Add scripts/leak-scan.mjs + a leak-scan CI job that fails a PR containing private workspace links, account-number references, or non-placeholder cloud account IDs. Structural patterns only — the script carries no sensitive literals. Scans all tracked files in a few seconds.
  • Minor config tidy-ups in .env.example and a code comment.

Replaces PR #141, which GitHub auto-closed when its branch was renamed. Review comments on that PR were already triaged and their fixes are in this branch's history.

Summary by CodeRabbit

  • Documentation

    • Added a canonical argument reference for consistent presentation of key information.
    • Removed outdated archived documents and references.
    • Updated setup guidance and clarified current documentation structure.
  • Quality Improvements

    • Added automated checks to help detect accidentally committed private information.
    • Updated content lookup to use the current canonical documentation source.

mikepsinn and others added 5 commits July 24, 2026 18:21
Removes private data that GitHub secret scanning does not catch:
- docs/archive/EXPECTED_VALUE_DATABASE.md: strip 12 private Notion
  workspace links (root CLAUDE.md forbids copying Notion links into the
  repo) and a collaborator's first name.
- nonprofit-identity.ts: remove bank name + account last-4 and a private
  vendor rejection from a code comment.
- .env.example: replace a real cloud account ID with a placeholder.

Adds scripts/leak-scan.mjs + a CI job that fails PRs containing private
Notion links, bank-account references, or non-placeholder cloud account
IDs. Structural patterns only, so the denylist itself carries no secrets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Per Mike: deleting the archived planning docs is cleaner than leaving
redaction breadcrumbs, and archived planning docs belong in Notion (repo
policy), not a public repo. Removes all of docs/archive/ (including the
Notion-link-leaking EXPECTED_VALUE_DATABASE.md).

The fix-ai canonical-argument transcript is read at runtime, so it is
relocated to docs/ (the loader already had a docs/ fallback path);
trimmed the now-dead archive candidate paths and the docs/README entry.
fix-ai-content test passes against the new location.

Keeps the nonprofit-identity.ts + .env.example redactions and the CI
leak-scan gate from the first commit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- notion-private-link rule: match slug-prefixed notion.so URLs
  (notion.so/<workspace>/<Title>-<hex>, the default Notion "copy link"
  format) and *.notion.site hosts, not just a bare hex segment
  immediately after notion.so/. Verified the old regex missed both
  real-world formats; verified the new one still ignores the
  notion.so/mercury-style test fixtures.
- bank-account-ref rule: add "account number:", "account no.", and
  "account no 1234" phrasing as an additional alternative alongside
  the existing checking/savings/account #NNNN pattern.
- tracked(): use `git ls-files -z` and split on the NUL byte instead
  of newline-splitting, so a tracked filename containing a newline
  can't produce a bogus path and skip scanning.
- ci.yml leak-scan job: set persist-credentials: false on the
  checkout step. This job checks out untrusted PR content (a fork PR
  could modify scripts/leak-scan.mjs itself) and never needs to push
  afterward, matching the same pattern already used at ci.yml:895 for
  the fork-head checkout in sync-preview-managed-data.

node scripts/leak-scan.mjs stays clean (3828 files).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 03:22

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
optimitron-web Canceled Canceled Jul 25, 2026 5:30pm

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 42 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7437de83-b24f-410a-a88f-97a9ba397f9f

📥 Commits

Reviewing files that changed from the base of the PR and between a7be074 and 406dc4f.

📒 Files selected for processing (1)
  • .github/workflows/claude-code-review.yml
📝 Walkthrough

Walkthrough

Adds a CI leak scanner, removes archived documentation and references, adds a canonical argument document, updates its runtime lookup, and adjusts related configuration and identity comments.

Changes

Repository hygiene and canonical documentation

Layer / File(s) Summary
CI leak scanning
scripts/leak-scan.mjs, .github/workflows/ci.yml
Adds denylist-based scanning of tracked files and runs it in a restricted CI job.
Canonical document and lookup
docs/canonical-argument-2026-05-20.md, packages/web/src/app/fix-ai/corpus.server.ts, docs/MCP_SERVER.md
Adds the canonical argument and parameter mapping, removes the archived prototype reference, and restricts lookup to non-archive paths.
Archive and repository documentation cleanup
docs/archive/*, docs/README.md
Deletes archived documents and removes the archive directory from the documentation index.
Configuration and identity metadata
.env.example, packages/web/src/lib/nonprofit-identity.ts
Updates the sample R2 endpoint comment and nonprofit disbursement wording.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CI as leak-scan CI job
  participant Checkout as actions/checkout
  participant Scanner as scripts/leak-scan.mjs
  participant Files as tracked repository files
  CI->>Checkout: checkout without persisted credentials
  CI->>Scanner: run node scripts/leak-scan.mjs
  Scanner->>Files: enumerate and scan tracked files
  Scanner-->>CI: report matches and return exit status
Loading

Possibly related PRs

🚥 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 too vague to convey the main change in this PR. Use a specific title that summarizes the primary change, such as adding leak-scan CI and removing archived docs.
✅ 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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/cleanup

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.

@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: 665060083a

ℹ️ 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 scripts/leak-scan.mjs Outdated
Comment thread docs/archive/EXPECTED_VALUE_DATABASE.md
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

PR review packet

Start here

  • 🖼️ Visual review
  • 🚀 Preview deployment
  • ☝️ Cmd/Ctrl-click review links to keep this PR open.
  • 🔑 ?login=demo signs in as the demo user; ?logout=1 clears the session.
  • 💬 For a visual problem, use the comment button in latest.html or reply here with @claude and the checklist item.

No user-facing page or component changes were inferred from changed files or the visual review manifest.

Changed files considered
  • .env.example
  • .github/workflows/ci.yml
  • docs/MCP_SERVER.md
  • docs/README.md
  • docs/canonical-argument-2026-05-20.md
  • packages/web/src/app/fix-ai/corpus.server.ts
  • packages/web/src/lib/nonprofit-identity.ts
  • scripts/leak-scan.mjs

Updated automatically when this PR's preview or visual review reruns.

- bank-account-ref pattern now matches camelCase/snake_case keys
  (accountNumber, ACCOUNT_NUMBER) and quoted or =-delimited values,
  which previously slipped past the CI leak-scan gate.
- MCP_SERVER.md no longer links to the deleted docs/archive/
  EXPECTED_VALUE_DATABASE.md file.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

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

Actionable comments posted: 5

🧹 Nitpick comments (1)
docs/canonical-argument-2026-05-20.md (1)

48-48: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move operational backlog items into the task tree.

The slider note and open-questions list are a parallel Markdown checklist for audits, implementation, and product decisions. Move them to the owning optimitron:dev tasks, update their status/comments, and leave task links here; replace “this turn” with a dated status if the note remains. As per coding guidelines, use the production optimitron:dev task tree instead of maintaining a parallel Markdown checklist.

Also applies to: 66-72

🤖 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 `@docs/canonical-argument-2026-05-20.md` at line 48, Move the slider note and
open questions around the referenced documentation section into the owning
optimitron:dev task tree, updating each task’s status and comments as needed.
Replace the Markdown checklist entries with links to those tasks, and if any
note remains, replace “this turn” with a dated status.

Source: Coding guidelines

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

Inline comments:
In `@docs/canonical-argument-2026-05-20.md`:
- Line 18: Separate the unsupported causal connection between reducing the
capacity claim from 122 to 121 and achieving a 12× speedup. Update the
statements around the capacity claim and the `443 ÷ 36` calculation so the
speedup is presented only as derived from that calculation, unless a valid
derivation linking the two values is added.
- Line 21: Normalize the terrorism and disease risk figures in the argument so
both use the same time horizon, updating the associated wording and parameter
mapping consistently. Revise the “actual risk distribution” comparison to
reflect the normalized values rather than contrasting annual terrorism risk with
lifetime disease mortality.
- Around line 62-64: Update the ratio entry in the parameter table to use the
intended cost-of-war-and-disease numerator and the universal shirt distribution
cost denominator, matching the framing on lines 46 and 71. If retaining 1.77
million×, reference the unrounded values used to calculate it; otherwise change
the displayed ratio to match the rounded $84Q ÷ $48B inputs.

In `@scripts/leak-scan.mjs`:
- Around line 44-45: Remove the broad scripts/leak-scan.mjs entry from
PATH_ALLOW so the scanner source is scanned for leaked content. Keep PATH_ALLOW
only for narrowly reviewed path exemptions, adding line-specific handling only
if the scanner itself requires it.
- Around line 73-75: Update the exemption check in the line-processing loop of
leak-scan.mjs so “leak-scan-ok” is recognized only within a valid trailing
comment, not arbitrary line content. Match the supported inline comment syntax
according to the scanned file type, while preserving exemptions for legitimate
trailing comments.

---

Nitpick comments:
In `@docs/canonical-argument-2026-05-20.md`:
- Line 48: Move the slider note and open questions around the referenced
documentation section into the owning optimitron:dev task tree, updating each
task’s status and comments as needed. Replace the Markdown checklist entries
with links to those tasks, and if any note remains, replace “this turn” with a
dated status.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a623c0c1-72df-4730-aeaa-cdd12037cad7

📥 Commits

Reviewing files that changed from the base of the PR and between 819d9b7 and a7be074.

📒 Files selected for processing (19)
  • .env.example
  • .github/workflows/ci.yml
  • docs/MCP_SERVER.md
  • docs/README.md
  • docs/archive/EXPECTED_VALUE_DATABASE.md
  • docs/archive/README.md
  • docs/archive/REFERENCES.md
  • docs/archive/TODO-history-2026-07.md
  • docs/archive/ai-challenge-eod-2026-05-20.md
  • docs/archive/earth-optimization-date-2026-05-20.md
  • docs/archive/joke-handout-draft.md
  • docs/archive/mcp-tasks-improvements-2026-05-24.md
  • docs/archive/mockup.md
  • docs/archive/one-percent-treaty-song.md
  • docs/archive/shirt-distribution-thesis-2026-05-20.md
  • docs/canonical-argument-2026-05-20.md
  • packages/web/src/app/fix-ai/corpus.server.ts
  • packages/web/src/lib/nonprofit-identity.ts
  • scripts/leak-scan.mjs
💤 Files with no reviewable changes (12)
  • docs/archive/TODO-history-2026-07.md
  • docs/archive/joke-handout-draft.md
  • docs/archive/mockup.md
  • docs/archive/mcp-tasks-improvements-2026-05-24.md
  • docs/archive/EXPECTED_VALUE_DATABASE.md
  • docs/archive/shirt-distribution-thesis-2026-05-20.md
  • docs/archive/earth-optimization-date-2026-05-20.md
  • docs/archive/README.md
  • docs/archive/REFERENCES.md
  • docs/README.md
  • docs/archive/ai-challenge-eod-2026-05-20.md
  • docs/archive/one-percent-treaty-song.md

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

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 5

🧹 Nitpick comments (1)
docs/canonical-argument-2026-05-20.md (1)

48-48: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move operational backlog items into the task tree.

The slider note and open-questions list are a parallel Markdown checklist for audits, implementation, and product decisions. Move them to the owning optimitron:dev tasks, update their status/comments, and leave task links here; replace “this turn” with a dated status if the note remains. As per coding guidelines, use the production optimitron:dev task tree instead of maintaining a parallel Markdown checklist.

Also applies to: 66-72

🤖 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 `@docs/canonical-argument-2026-05-20.md` at line 48, Move the slider note and
open questions around the referenced documentation section into the owning
optimitron:dev task tree, updating each task’s status and comments as needed.
Replace the Markdown checklist entries with links to those tasks, and if any
note remains, replace “this turn” with a dated status.

Source: Coding guidelines

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

Inline comments:
In `@docs/canonical-argument-2026-05-20.md`:
- Line 18: Separate the unsupported causal connection between reducing the
capacity claim from 122 to 121 and achieving a 12× speedup. Update the
statements around the capacity claim and the `443 ÷ 36` calculation so the
speedup is presented only as derived from that calculation, unless a valid
derivation linking the two values is added.
- Line 21: Normalize the terrorism and disease risk figures in the argument so
both use the same time horizon, updating the associated wording and parameter
mapping consistently. Revise the “actual risk distribution” comparison to
reflect the normalized values rather than contrasting annual terrorism risk with
lifetime disease mortality.
- Around line 62-64: Update the ratio entry in the parameter table to use the
intended cost-of-war-and-disease numerator and the universal shirt distribution
cost denominator, matching the framing on lines 46 and 71. If retaining 1.77
million×, reference the unrounded values used to calculate it; otherwise change
the displayed ratio to match the rounded $84Q ÷ $48B inputs.

In `@scripts/leak-scan.mjs`:
- Around line 44-45: Remove the broad scripts/leak-scan.mjs entry from
PATH_ALLOW so the scanner source is scanned for leaked content. Keep PATH_ALLOW
only for narrowly reviewed path exemptions, adding line-specific handling only
if the scanner itself requires it.
- Around line 73-75: Update the exemption check in the line-processing loop of
leak-scan.mjs so “leak-scan-ok” is recognized only within a valid trailing
comment, not arbitrary line content. Match the supported inline comment syntax
according to the scanned file type, while preserving exemptions for legitimate
trailing comments.

---

Nitpick comments:
In `@docs/canonical-argument-2026-05-20.md`:
- Line 48: Move the slider note and open questions around the referenced
documentation section into the owning optimitron:dev task tree, updating each
task’s status and comments as needed. Replace the Markdown checklist entries
with links to those tasks, and if any note remains, replace “this turn” with a
dated status.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a623c0c1-72df-4730-aeaa-cdd12037cad7

📥 Commits

Reviewing files that changed from the base of the PR and between 819d9b7 and a7be074.

📒 Files selected for processing (19)
  • .env.example
  • .github/workflows/ci.yml
  • docs/MCP_SERVER.md
  • docs/README.md
  • docs/archive/EXPECTED_VALUE_DATABASE.md
  • docs/archive/README.md
  • docs/archive/REFERENCES.md
  • docs/archive/TODO-history-2026-07.md
  • docs/archive/ai-challenge-eod-2026-05-20.md
  • docs/archive/earth-optimization-date-2026-05-20.md
  • docs/archive/joke-handout-draft.md
  • docs/archive/mcp-tasks-improvements-2026-05-24.md
  • docs/archive/mockup.md
  • docs/archive/one-percent-treaty-song.md
  • docs/archive/shirt-distribution-thesis-2026-05-20.md
  • docs/canonical-argument-2026-05-20.md
  • packages/web/src/app/fix-ai/corpus.server.ts
  • packages/web/src/lib/nonprofit-identity.ts
  • scripts/leak-scan.mjs
💤 Files with no reviewable changes (12)
  • docs/archive/TODO-history-2026-07.md
  • docs/archive/joke-handout-draft.md
  • docs/archive/mockup.md
  • docs/archive/mcp-tasks-improvements-2026-05-24.md
  • docs/archive/EXPECTED_VALUE_DATABASE.md
  • docs/archive/shirt-distribution-thesis-2026-05-20.md
  • docs/archive/earth-optimization-date-2026-05-20.md
  • docs/archive/README.md
  • docs/archive/REFERENCES.md
  • docs/README.md
  • docs/archive/ai-challenge-eod-2026-05-20.md
  • docs/archive/one-percent-treaty-song.md
🛑 Comments failed to post (5)
docs/canonical-argument-2026-05-20.md (3)

18-18: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Do not encode an unsupported causal link between the 121/122 claim and 12× speed.

Line 18 makes the speedup conditional on reducing overkill from 122 to 121, but Lines 55-56 derive 12× solely from 443 ÷ 36 ≈ 12.3; no relationship to the 122→121 change is modeled. Split the claims or add the missing derivation before exposing them downstream.

Also applies to: 55-56

🤖 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 `@docs/canonical-argument-2026-05-20.md` at line 18, Separate the unsupported
causal connection between reducing the capacity claim from 122 to 121 and
achieving a 12× speedup. Update the statements around the capacity claim and the
`443 ÷ 36` calculation so the speedup is presented only as derived from that
calculation, unless a valid derivation linking the two values is added.

21-21: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Normalize the risk comparison to one time horizon.

Line 59 defines terrorism risk annually, while Line 60 describes lifetime disease mortality. Comparing them as the “actual risk distribution” is not valid; use annual-to-annual or lifetime-to-lifetime values and update the wording and parameter mapping.

🤖 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 `@docs/canonical-argument-2026-05-20.md` at line 21, Normalize the terrorism
and disease risk figures in the argument so both use the same time horizon,
updating the associated wording and parameter mapping consistently. Revise the
“actual risk distribution” comparison to reflect the normalized values rather
than contrasting annual terrorism risk with lifetime disease mortality.

62-64: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -n '\b(EXPECTED_TREATY_VALUE_USD|DFDA_TRIAL_CAPACITY_PLUS_EFFICACY_LAG_ECONOMIC_VALUE|UNIVERSAL_SHIRT_DISTRIBUTION_COST_USD)\b' --glob '!node_modules' --glob '!dist'

Repository: mikepsinn/optimitron

Length of output: 158


🏁 Script executed:

#!/bin/bash
set -u

echo "== repo files related to target =="
fd -a 'canonical-argument-2026-05-20\.md$|AGENTS\.md$|SYSTEM_MAP\.md$' . | sed 's#^\./##'

echo
echo "== target file outline/size =="
wc -l docs/canonical-argument-2026-05-20.md 2>/dev/null || true
sed -n '1,100p' docs/canonical-argument-2026-05-20.md 2>/dev/null || true

echo
echo "== search canonical identifiers broadly =="
find docs .claude pnpm-lock.yaml 2>/dev/null | head -500 | xargs rg -n '\b(EXPECTED_TREATY_VALUE_USD|DFDA_TRIAL_CAPACITY_PLUS_EFFICACY_LAG_ECONOMIC_VALUE|UNIVERSAL_SHIRT_DISTRIBUTION_COST_USD|shirt distribution|Millions of times less|84Q|48B)\b' 2>/dev/null || true

Repository: mikepsinn/optimitron

Length of output: 12122


🏁 Script executed:

#!/bin/bash
set -u

echo "== parameter definitions/search =="
rg -n '\b(EXPECTED_TREATY_VALUE_USD|DFDA_TRIAL_CAPACITY_PLUS_EFFICACY_LAG_ECONOMIC_VALUE|UNIVERSAL_SHIRT_DISTRIBUTION_COST_USD)\b' --glob '!node_modules' --glob '!dist' 2>/dev/null || true

echo
echo "== related parameter names =="
rg -n '(EXPECTED_TREATY_VALUE|TREATY.*VALUE|ECONOMIC_VALUE|UNIVERSAL_SHIRT|SHIRT_DISTRIBUTION_COST)\b' --glob '!node_modules' --glob '!dist' 2>/dev/null || true

echo
echo "== docs/questions relevant sections =="
sed -n '690,815p' docs/questions.md 2>/dev/null || true

echo
echo "== arithmetic check for rounded inputs =="
python3 - <<'PY'
n = 84e15
d = 48e9
print("rounded ratio =", n/d, "million =", n/d/1e6)
PY

Repository: mikepsinn/optimitron

Length of output: 193


Align the “millions of times less” ratio with its denominator.

Lines 46 and 71 frame the cited ratio as shirt cost versus the cost of war and disease. In the parameter table, line 63 maps $84Q to DFDA_TRIAL_CAPACITY_PLUS_EFFICACY_LAG_ECONOMIC_VALUE, while line 64 derives the ratio from EXPECTED_TREATY_VALUE_USD ÷ UNIVERSAL_SHIRT_DISTRIBUTION_COST_USD. Use the intended numerator/denominator consistently, and if 1.77 million× is intentional, show the unrounded input values because the displayed rounded inputs give 84Q ÷ 48B = 1.75M×.

🤖 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 `@docs/canonical-argument-2026-05-20.md` around lines 62 - 64, Update the ratio
entry in the parameter table to use the intended cost-of-war-and-disease
numerator and the universal shirt distribution cost denominator, matching the
framing on lines 46 and 71. If retaining 1.77 million×, reference the unrounded
values used to calculate it; otherwise change the displayed ratio to match the
rounded $84Q ÷ $48B inputs.
scripts/leak-scan.mjs (2)

44-45: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not exclude the scanner source from scanning.

Line 45 omits every version of this tracked file, so an actual private URL or account reference added to scripts/leak-scan.mjs will always pass CI. The current scanner source does not require this broad exclusion; remove it and use narrowly reviewed line exemptions if needed.

🤖 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 `@scripts/leak-scan.mjs` around lines 44 - 45, Remove the broad
scripts/leak-scan.mjs entry from PATH_ALLOW so the scanner source is scanned for
leaked content. Keep PATH_ALLOW only for narrowly reviewed path exemptions,
adding line-specific handling only if the scanner itself requires it.

73-75: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Require a real trailing comment for scan exemptions.

Line 75 accepts leak-scan-ok anywhere in the line. A private Notion URL can include that text in a query or fragment and bypass the scan without an inline comment. Match only supported trailing comment forms, preferably by file type.

Proposed direction
-    if (line.includes("leak-scan-ok")) continue;
+    if (hasTrailingLeakScanComment(file, line)) continue;
🤖 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 `@scripts/leak-scan.mjs` around lines 73 - 75, Update the exemption check in
the line-processing loop of leak-scan.mjs so “leak-scan-ok” is recognized only
within a valid trailing comment, not arbitrary line content. Match the supported
inline comment syntax according to the scanned file type, while preserving
exemptions for legitimate trailing comments.

github-actions Bot and others added 2 commits July 25, 2026 17:16
update-pr-branches.yml (merged in #142) pushes merge-from-main commits as
github-actions[bot]. claude-code-action hard-fails for non-human actors
("Workflow initiated by non-human actor"), so every auto-updated PR got a
red claude-review check the moment the auto-updater did its job — first
seen on PR #143 within a minute of #142 landing.

Skip the job for bot-triggered synchronize events instead of allowlisting
the bot: a merge from main leaves the PR diff unchanged, so re-reviewing
it would burn a full review run on nothing new.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf3c4CzpfCCqAQA2k4UQKH
@mikepsinn

Copy link
Copy Markdown
Owner Author

Superseded by a squashed version of the same diff (byte-identical content); new PR follows.

@mikepsinn mikepsinn closed this Jul 25, 2026
@mikepsinn
mikepsinn deleted the feature/cleanup branch July 25, 2026 17:23
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.

3 participants