Skip to content

feat(contracts): free plan renders 2 pages at once, up from 1 - #1207

Merged
nc9 merged 3 commits into
mainfrom
perf/free-render-width-2
Oct 28, 2026
Merged

nc9 merged 3 commits into
mainfrom
perf/free-render-width-2

Conversation

@nc9

@nc9 nc9 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Free-plan render width 1 to 2 (Nik's decision, private squirrelscan/repo#3576, root cause in #3561).

Per-plan render width (#2480) set free to 1, so a scheduled free audit renders its pages one at a time at about 13 s a page and the crawl stage grew from about 46 s to 176 s p50. This sets PLANS.free.renderConcurrency to 2. Pro (5), Team (10) and Enterprise (10) are unchanged, and the slot policy (per plan, enforced per audit by the cloud runner and clamped by the CLI) is unchanged: everything reads this one constant.

  • packages/core-contracts/src/plans.ts: free 1 to 2, with the reason in the comment.
  • A test pins all four widths and that Pro stays wider than Free.
  • Docs that name the width: docs/configuration/cloud.mdx and docs/guides/audit-levels.mdx (Free 2, Pro 5, Team 10). The pricing page and the dashboard note read the constant.
  • CHANGELOG entry under Changed.

Capacity: render cost per page is unchanged (credits are flat per page, browser time per page is the same); only concurrent browser sessions per free audit go from 1 to 2, still below the 5 every plan held before #2480.

Docs: updated here. Agent skill: no change (it does not name the width). The private gitlink bump ships it; a private test that pins the singular copy is fixed there.

Gates: tsgo --noEmit in core-contracts, scripts/test-suites.ts --run rest (1850 pass), CLI crawl-concurrency and unlimited-balance tests, bun x [email protected] check --strict clean. DCO signed.

@claude

claude Bot commented Oct 27, 2026

Copy link
Copy Markdown

Reviewed the diff. I found no blocking issues.

  • The constant change in plans.ts is the only behavioural change. Docs, CHANGELOG and the new test match it.
  • I grepped the repo for other places that still say Free renders 1 page. I found none.
  • The new test pins all four widths and checks that Pro stays wider than Free.

(nit) plans.ts: the new comment lines are a bit longer than the surrounding ones. Rewrap them if the formatter complains.

(nit) The CHANGELOG bullet has no issue reference at the end, which AGENTS.md asks for. The private issue repo#3576 may be why it is missing. If so, ignore this.

@claude

claude Bot commented Oct 27, 2026

Copy link
Copy Markdown

Review of #1207: the change is small and correct. PLANS.free.renderConcurrency is the single source, and the docs, CHANGELOG and a new pinning test all match it. The comments I read are accurate.

  • (nit) apps/cli/tests/controllers/crawl-concurrency.test.ts:136 is still titled "free plan = 1". The test passes a literal 1 as the plan limit, so it still passes. The title is now stale and could mislead, so retitle it (e.g. "plan limit clamps render concurrency") or pass PLANS.free.renderConcurrency.
  • (nit) The reworded comment in apps/cli/src/controllers/audit.ts ("render concurrency was 1 then") is slightly awkward. Describing the original crawler: let users turn off the pre-crawl discovery probes (swagger.json/openapi.json get the audit IP banned by fail2ban) #409 behaviour without the "then" would read better.
  • (nit) The new test asserts four literals plus Pro > Free. That is fine as a pin. It does not check the clamp end to end, but the existing crawl-concurrency tests cover that.

No correctness, security or performance concerns. The load goes from 1 to 2 concurrent browser sessions per free audit, which the PR argues is below the pre-#2480 level of 5.

@claude

claude Bot commented Oct 27, 2026

Copy link
Copy Markdown

Review of #1207 (Free render width 1 → 2).

  • (medium) apps/cli/tests/controllers/crawl-concurrency.test.ts:136: the test "plan limit clamps render concurrency (free plan = 1)" still passes a literal 1. It passes, but it describes a plan that no longer exists, and nothing in the CLI tests ties the free-plan clamp to the new value. Drive it from PLANS.free.renderConcurrency or rename it.
  • (low) apps/cli/src/controllers/audit.ts:787: the reworded comment "(render concurrency was 1 then)" is history-flavoured. The crawler: let users turn off the pre-crawl discovery probes (swagger.json/openapi.json get the audit IP banned by fail2ban) #409 reasoning still holds at any low width, so consider reverting that line.
  • (low) packages/core-contracts/src/plans.ts:42-45 cites squirrelscan/repo#3576, a private repo reference. It matches the existing #2480 reference, so this is only a note.
  • (nit) The CHANGELOG bullet has no (#123) issue reference, which AGENTS.md asks for. Its timings (about 3 minutes vs about 50 seconds) also differ from the code comment (46 s → 176 s).

I found no other hardcoded Free = 1: pagesAtOnce and the upsell hint read from PLANS. I did not run the tests.

nc9 added a commit that referenced this pull request Oct 27, 2026
…unblock the release gate (#1210)

The Dependency audit fails on main (and on #1181 and #1207) on a new moderate advisory in [email protected], reached only through the docs workspace (tangly, OG images at docs build time). Not in the CLI, engine or any shipped package. The fix is in satori >=0.33.5, outside tangly's ^0.26.0 range, so an override is a breaking 0.x jump on the docs build. Same pattern as earlier ignores (#455, #1086): ignore with a reason, remove when tangly updates.

Skill: no change needed. Docs: none.
@nc9
nc9 force-pushed the perf/free-render-width-2 branch from 1e92f39 to dbcd0f1 Compare October 27, 2026 22:24
@claude

claude Bot commented Oct 27, 2026

Copy link
Copy Markdown

Reviewed the diff. The change is small and consistent: one constant moves from 1 to 2, and the CLI clamp, docs and comments are updated to match. I found no blocking issues.

  • (nit) apps/cli/src/controllers/audit.ts:787: the reworded comment, "render concurrency was 1 then", is a history note inside a comment that describes current behaviour. Consider dropping the width or pointing at crawler: let users turn off the pre-crawl discovery probes (swagger.json/openapi.json get the audit IP banned by fail2ban) #409, so the next change to the constant doesn't leave it stale.
  • (nit) apps/cli/tests/controllers/crawl-concurrency.test.ts:136: the test is titled "free plan = 1". I assume it passes its own value rather than reading PLANS.free, so it passes either way. Consider renaming it, or reading the constant, so the title doesn't contradict the new width. I didn't run it.
  • (nit) The new plans.test.ts case pins literal widths, which is fine as a deliberate pin. The toBeGreaterThan line is already implied by the literals above it.

Docs: docs/configuration/cloud.mdx and docs/guides/audit-levels.mdx are updated. I grepped for other docs naming the free width and found none. The CHANGELOG bullet has no issue reference at the end, which AGENTS.md asks for. The linked issue is in a private repo, so this is fine if that is intentional.

🤖 Generated with Claude Code

@nc9
nc9 force-pushed the perf/free-render-width-2 branch from dbcd0f1 to 0f745e5 Compare October 28, 2026 00:48
@claude

claude Bot commented Oct 28, 2026

Copy link
Copy Markdown

Reviewed the diff. The change is small and consistent: one constant moves from 1 to 2, and the docs and comments follow. I found nothing blocking.

Test coverage is adequate. The new test pins all four plan widths and the Free-below-Pro ordering.

@nc9
nc9 merged commit c73177f into main Oct 28, 2026
15 checks passed
@nc9
nc9 deleted the perf/free-render-width-2 branch October 28, 2026 01:05
nc9 added a commit that referenced this pull request Oct 28, 2026
* origin/main:
  feat(contracts): free plan renders 2 pages at once, up from 1 (#1207)
  ci(deps): daily dependency advisory check files one issue when the release gate fails (#1217)
  docs(rules): the SEO rules page counts 26 structured data rules (#1213)
  build(deps): ignore GHSA-gcqx-w48m-w2h4 (deepmerge via ultracite, dev tooling only) to unblock the release gate (#1216)
  chore(release): v0.0.138 notes and version bump (#1212)
  feat(report,rules): link sections, component-aware findings, fix rollups, Page structure block (#1181)
  fix(classifier): parse homepage URLs safely, backslash paths are not the root (#1206)
  build(deps): ignore GHSA-wx4j-mvgx-mqwp (satori, docs build only) to unblock the release gate (#1210)
nc9 added a commit that referenced this pull request Oct 28, 2026
* origin/main:
  feat(contracts): free plan renders 2 pages at once, up from 1 (#1207)
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