Skip to content

Fix broken redirects and dead external links - #63

Merged
agoldis merged 19 commits into
mainfrom
fix/broken-links-and-redirects
Aug 8, 2026
Merged

Fix broken redirects and dead external links#63
agoldis merged 19 commits into
mainfrom
fix/broken-links-and-redirects

Conversation

@agoldis

@agoldis agoldis commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

User description

Follow-up to the Ahrefs site audit and www.currents.dev#246 — this fixes the docs-side broken links that couldn't be fixed in the www repo.

Redirect map (.gitbook.yaml)

  • Repaired 23 entries whose target files no longer exist after content moves (ci-setup pages flattened, Cypress CI guides moved under other-frameworks/cypress, guides moved to ci-optimization, run-status moved to dashboard/analytics, slack/currents-playwright became directories, resources/api moved to the API space). Validated programmatically: every redirect target in the map now exists on disk, no duplicate keys.
  • Added 14 entries for old URLs that currently hard-404 and are still linked externally: billing-and-pricing, administration/billing-and-usage, dashboard/administration/team-management, dashboard/runs/run-status, getting-started/playwright, old guides/pw-parallelization* and getting-started/ci-setup/{circleci,azure-devops,aws-code-build,bitbucket,nx/playwright-nx} paths.

Dead external links (every replacement curl-verified 200)

Old New Why
currents-dev/currents-playwright/blob/main/CHANGELOG.md currents-dev/currents-playwright-changelog/blob/main/CHANGELOG.md repo gone; npm repository field points at the new changelog repo
circleci.com/docs/2.0/{env-vars,parallelism-faster-jobs,configuration-reference} same without 2.0/ CircleCI dropped the version prefix
developer.harness.io/docs/category/set-up-cicd-pipelines …/docs/continuous-integration/ category page retired
slack.com/help/articles/360057541954-Get-user-and-group-IDs …/221769328-Locate-your-Slack-URL-or-ID article replaced
applitools.com/tutorials/guides/advanced-use-cases/parallel-test-suites#step-3-closing-the-batch applitools.com/docs/eyes/concepts/test-execution/parallel-test-suites#… tutorials moved to docs; anchor exists at new URL
raw github.com/currents-dev/currents-readme/blob/main/dashboard/reporters/…/configuration.md in run-details.md relative configuration.md mention link path no longer exists; internal link survives future moves

Not addressed here

  • Old resources/api/* URLs (12 of the Ahrefs 404s) can't be redirected from this space's .gitbook.yaml — the API docs live in a separate GitBook space (docs.currents.dev/api). Those need site-level redirects in the GitBook UI (old resources/api/introduction/api, resources/api/api-resources/<x>/api/resources/<x>, etc.).
  • guides/pw-parallelization.md and guides/coverage.md exist on disk but aren't in SUMMARY.md (unpublished) — left alone, flagging in case that's unintentional.
  • npmjs 403s in the Ahrefs report are bot-blocking, not real breaks.

🤖 Generated with Claude Code


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Repair GitBook redirects, navigation references, and vendor links so moved documentation remains discoverable and externally referenced URLs resolve correctly. Clarify Currents run-cancellation workflows across GitHub Actions and GitLab, including job-scoped credentials, CI build IDs, retry behavior, and provider limitations.

TopicDetails
Development tooling Enable the internal Currents skills plugin for the documentation development workflow.
Modified files (1)
  • .claude/settings.json
Latest Contributors(1)
UserCommitDate
agoldis@gmail.comApply the docs writing...August 08, 2026
CI run cancellation Explain reliable run cancellation with currents cancel and the GitHub Actions cancellation action, ensuring shared job-level environment variables and stable CURRENTS_CI_BUILD_ID values across reporting, parallel jobs, retries, and GitLab cancellation hooks.
Modified files (3)
  • dashboard/runs/cancel-run.md
  • getting-started/ci-setup/github-actions/cancel-runs.md
  • resources/reporters/currents-cmd/currents-cancel.md
Latest Contributors(2)
UserCommitDate
agoldis@gmail.comSplit the GitLab cance...August 08, 2026
miguel@currents.devExamples linksMarch 10, 2026
Documentation links Replace retired external URLs and repository references with current destinations across CI setup, visual testing, Slack integration, changelog, and run-details documentation.
Modified files (7)
  • dashboard/runs/run-details.md
  • getting-started/ci-setup/playwright-circleci.md
  • getting-started/ci-setup/playwright-harness.md
  • getting-started/other-frameworks/cypress/ci-setup/cypress-circleci.md
  • guides/playwright-visual-testing.md
  • resources/changelog.md
  • resources/integrations/slack/slack-app.md
Latest Contributors(2)
UserCommitDate
agoldis@gmail.comAddress review feedbac...August 08, 2026
dj@currents.devchore: apply more reas...June 18, 2026
Redirects and navigation Remap legacy URLs to relocated documentation and update the navigation structure so moved Playwright, Cypress, CI, dashboard, billing, and integration pages remain accessible.
Modified files (2)
  • .gitbook.yaml
  • SUMMARY.md
Latest Contributors(2)
UserCommitDate
agoldis@gmail.comMerge remote-tracking ...August 08, 2026
agoldis@users.noreply....[] docs: cancelling ru...July 30, 2026
Review this PR on Baz | Customize your next review

agoldis and others added 10 commits July 24, 2026 17:31
A cancelled CI job stops reporting mid-run, so the run stays in progress until
the project's inactivity timeout. `currents cancel` cancels it using the record
key the job already holds, on any CI provider.

- new page under @currents/cmd, listed in the subcommands and in SUMMARY
- a "Cancelling Runs from CI" section on the cancel-run page, above the API and
  GitHub Action sections
- a note on the GitHub Action section, since that route needs an API key
The GitHub Actions section had no landing page and no cancellation article,
and the cancellation examples still required an API key plus the GitHub run id
and attempt.

- new "Cancel Runs on Workflow Cancellation" article: the `if: cancelled()`
  step, both credentials, and how it pairs with `cancel-in-progress: true`
- the GitHub Actions README now lists what is in the section
- the action examples in cancel-run.md use the record key the job already has,
  with the API key kept as a second option
SUMMARY.md conflicted because this branch had rewritten every list marker from
`*` to `-`. Kept main's markers, which is what GitBook writes, and re-added the
two new entries on top.
`currents cancel` now accepts --run-id / CURRENTS_RUN_ID as well as the CI
build id.

Also state what happens when a job does not set CURRENTS_CI_BUILD_ID: the
generated CI build id includes the test framework, so a cancelling step that
rebuilds the value from environment variables does not find the run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QYks4ynK7rmCmDuVTVuo1b
Points the input list at the action's README, which is where it is
maintained, rather than at this page.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ci-build-id.md recommends `${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt }}`, and the other cancellation pages already use it. Also moves the GitLab CI build id to the pipeline level, where the reporting job reads the same value.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both the command and the action accept either identifier; the intros only mentioned the CI build ID.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@currents/cmd 1.10.0 is the first release with the command. npx resolves the
latest version, so this only matters for a pinned one.
The heading skipped from the H2 it sits under straight to H4, the only
place in the page that does.
Redirect map (.gitbook.yaml):
- Repair 23 entries whose target files no longer exist after content
  moves (ci-setup pages flattened, cypress CI guides moved under
  other-frameworks/cypress, guides moved to ci-optimization,
  run-status moved to dashboard/analytics, slack/currents-playwright
  became directories, resources/api moved to the API space)
- Add 14 entries for old URLs that currently hard-404 and are still
  linked from currents.dev and external sites (billing-and-pricing,
  administration/billing-and-usage, team-management, old guides/ and
  ci-setup/ paths, getting-started/playwright)

Dead external links (every replacement verified to return 200):
- @currents/playwright changelog: the currents-playwright repo is gone;
  the changelog now lives in currents-dev/currents-playwright-changelog
- circleci.com/docs/2.0/* dropped the 2.0 prefix
- Harness retired the set-up-cicd-pipelines category page
- Slack replaced the Get-user-and-group-IDs article with
  Locate-your-Slack-URL-or-ID
- Applitools moved tutorials/guides/* to docs/eyes/concepts/* (the
  step-3-closing-the-batch anchor exists at the new URL)
- run-details.md linked the reporter configuration page via a raw
  github.com/currents-dev/currents-readme URL pointing at a path that
  no longer exists; use a relative mention link instead

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

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The pull request updates GitBook redirects and documentation links. It also updates GitHub Actions and GitLab cancellation guidance for CI build IDs and environment variables.

Changes

Documentation and CI cancellation updates

Layer / File(s) Summary
Documentation redirects
.gitbook.yaml
Updated legacy redirect targets and added redirects for administration, billing, run status, Playwright, parallelization, rerun, and CI setup pages.
Documentation references
dashboard/runs/run-details.md, getting-started/ci-setup/*, getting-started/other-frameworks/cypress/ci-setup/cypress-circleci.md, guides/playwright-visual-testing.md, resources/changelog.md, SUMMARY.md, resources/integrations/slack/slack-app.md
Updated CI provider, CircleCI, Harness, Cypress, Applitools, changelog, and Slack documentation links.
CI cancellation guidance
dashboard/runs/cancel-run.md, getting-started/ci-setup/github-actions/cancel-runs.md, resources/reporters/currents-cmd/currents-cancel.md
Moved shared GitHub Actions variables to job scope, documented supported run-ID inputs, and updated GitLab cancellation behavior for canceled jobs, retries, and force-canceled jobs.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: miguelangaranocurrents

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary changes to redirects and outdated external links.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/broken-links-and-redirects

Comment @coderabbitai help to get the list of available commands.

@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)
getting-started/ci-setup/playwright-circleci.md (1)

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

Remove the remaining CircleCI redirect hops.

Both changed files use CircleCI aliases that currently redirect to canonical documentation pages. Replace the aliases directly. (circleci.com)

  • getting-started/ci-setup/playwright-circleci.md#L13-L17: use the canonical parallelism and configuration-reference paths.
  • getting-started/other-frameworks/cypress/ci-setup/cypress-circleci.md#L25-L25: use the canonical environment-variable path.
🤖 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 `@getting-started/ci-setup/playwright-circleci.md` around lines 13 - 17,
Replace the CircleCI redirect aliases at
getting-started/ci-setup/playwright-circleci.md:13-17 with the canonical
parallelism and configuration-reference documentation paths. Also update the
environment-variable link at
getting-started/other-frameworks/cypress/ci-setup/cypress-circleci.md:25 to its
canonical path; no other content changes are needed.
🤖 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 `@dashboard/runs/cancel-run.md`:
- Around line 114-126: Move CURRENTS_PROJECT_ID and CURRENTS_CI_BUILD_ID to
workflow- or job scope in dashboard/runs/cancel-run.md (lines 114-126), and
update the no-input example in
getting-started/ci-setup/github-actions/cancel-runs.md (lines 27-35) accordingly
so the cancellation step can access them. In
resources/reporters/currents-cmd/currents-cancel.md, replace the when:
on_failure trigger with a cancellation-aware after_script or equivalent cleanup
mechanism.

In `@getting-started/ci-setup/playwright-circleci.md`:
- Line 17: Update the CircleCI setup documentation sentence to refer to the
`parallelism` key in `.circleci/config.yml` instead of the `parallelism` flag in
`config.yaml`, keeping the executable example’s terminology consistent.

In `@resources/reporters/currents-cmd/currents-cancel.md`:
- Line 13: Change the Usage heading in currents-cancel.md from a level-three
heading to a level-two heading so it follows the page’s H1 hierarchy and
satisfies Markdownlint MD001.
- Around line 64-75: Update the GitLab example in
resources/reporters/currents-cmd/currents-cancel.md:64-75 to run npx currents
cancel from the reporting job’s after_script only when CI_JOB_STATUS equals
"canceled", rather than using a separate when: on_failure job, and document that
force-cancel skips after_script. The GitHub Actions example in
getting-started/ci-setup/github-actions/cancel-runs.md:64-75 requires no change
because its cancelled() condition is already correct.
- Line 38: Update the cancellation guidance in the documented CI build ID
fallback section to cover both paths: supported CI providers use a
server-assigned ID from CI metadata, while undetected providers use an
auto:<random-string> ID. State that currents cancel cannot reconstruct
server-assigned IDs and therefore requires CURRENTS_CI_BUILD_ID or
CURRENTS_RUN_ID, then apply the same wording to both relevant pages.

---

Nitpick comments:
In `@getting-started/ci-setup/playwright-circleci.md`:
- Around line 13-17: Replace the CircleCI redirect aliases at
getting-started/ci-setup/playwright-circleci.md:13-17 with the canonical
parallelism and configuration-reference documentation paths. Also update the
environment-variable link at
getting-started/other-frameworks/cypress/ci-setup/cypress-circleci.md:25 to its
canonical path; no other content changes are needed.
🪄 Autofix

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d335ca52-bcf8-4cd0-935d-5567ec7fb9c3

📥 Commits

Reviewing files that changed from the base of the PR and between 58b97af and 45ed475.

📒 Files selected for processing (14)
  • .gitbook.yaml
  • SUMMARY.md
  • dashboard/runs/cancel-run.md
  • dashboard/runs/run-details.md
  • getting-started/ci-setup/github-actions/README.md
  • getting-started/ci-setup/github-actions/cancel-runs.md
  • getting-started/ci-setup/playwright-circleci.md
  • getting-started/ci-setup/playwright-harness.md
  • getting-started/other-frameworks/cypress/ci-setup/cypress-circleci.md
  • guides/playwright-visual-testing.md
  • resources/changelog.md
  • resources/integrations/slack/slack-app.md
  • resources/reporters/currents-cmd/README.md
  • resources/reporters/currents-cmd/currents-cancel.md

Comment thread dashboard/runs/cancel-run.md Outdated
Comment thread getting-started/ci-setup/playwright-circleci.md Outdated
Comment thread resources/reporters/currents-cmd/currents-cancel.md Outdated
Comment thread resources/reporters/currents-cmd/currents-cancel.md Outdated
Comment thread resources/reporters/currents-cmd/currents-cancel.md Outdated
Comment thread resources/reporters/currents-cmd/currents-cancel.md Outdated
Comment thread .gitbook.yaml
Comment thread .gitbook.yaml
Comment thread getting-started/ci-setup/github-actions/cancel-runs.md Outdated
agoldis and others added 2 commits August 7, 2026 23:27
Cancellation examples could not work as written:

- dashboard/runs/cancel-run.md declared CURRENTS_PROJECT_ID and
  CURRENTS_CI_BUILD_ID in the reporting step's env, then read them back as
  ${{ env.* }} from the cancelling step, where a step's env is not visible.
  Both examples now declare them on the job.
- currents-cancel.md's GitLab example used `when: on_failure`, which fires
  on a failed job, not a cancelled one — so the one case the page exists to
  cover was the case it did not handle. Replaced with an after_script that
  checks CI_JOB_STATUS, which GitLab does run on cancellation, plus a note
  that force cancel skips after_script.
- The CI build id warning described only the framework-prefixed value
  generated for a recognised CI provider. Unrecognised providers get a
  random id instead; neither is reproducible by a separate step, which is
  the point the warning was making.

Also: CircleCI links pointed at aliases that 301 to the guides/ and
reference/ tree, and cypress-circleci linked setup instructions through
currents.dev/readme/*, which redirects twice before landing on
resources/reporters/cypress-cloud. Both now point at the final target.
The parallelism sentence said "flag in config.yaml"; it is a key, and the
file in the example is .circleci/config.yml.

Not changed: MD001 wants ## rather than ### after the H1 in
currents-cancel.md. All six files in resources/reporters/currents-cmd/ use
### with no H2, so fixing this one alone makes it the odd one out, and
fixing all six is unrelated to this PR.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vBAvmWyyJsE1eTnxXL2XP
@agoldis

agoldis commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Addressed in d94f467. Verified each finding against the files first — four were real, one I'm skipping with a reason.

Fixed

Env scope (Major). Confirmed — dashboard/runs/cancel-run.md declared CURRENTS_PROJECT_ID / CURRENTS_CI_BUILD_ID in the Run tests step's env:, then read them back as ${{ env.* }} from the cancelling step, where a step's env isn't visible. Both examples now declare them on the job.

The same inconsistency was in currents-cancel.md: the prose said "a job that already exports…" while the example duplicated step-level env on both steps. Now job-scoped, which is what makes the "no arguments" claim true.

GitLab when: on_failure (Major). Confirmed and worth flagging as the most consequential one — on_failure fires on a failed job, and a cancelled job isn't a failed one, so the single case the page exists to cover was the case it didn't handle. Replaced with an after_script guarded on $CI_JOB_STATUS, plus a note that force cancel skips after_script so those runs still end at the timeout.

CI build id fallback. Valid. Reworded to cover both paths. I checked guides/parallelization-guide/ci-build-id.md for the authoritative behaviour rather than adopting the suggested auto:<random-string> literal — the repo documents it as "a random unique id" without committing to a format, so I described it that way instead of inventing a string.

parallelism wording. Valid — it's a key, not a flag, and the file in the example directly below is .circleci/config.yml, not config.yaml.

CircleCI redirect hops (nitpick). Valid, all four confirmed:

/docs/parallelism-faster-jobs/        301 -> /docs/guides/optimize/parallelism-faster-jobs/
/docs/configuration-reference/        301 -> /docs/reference/configuration-reference/
/docs/contexts/                       301 -> /docs/guides/security/contexts/
/docs/env-vars/                       301 -> /docs/guides/security/env-vars/

Confirmed id="parallelism" still exists on the canonical page before moving the anchor.

While there: cypress-circleci.md linked setup instructions through currents.dev/readme/integration-with-cypress/cypress-cloud, which redirects twice before landing on resources/reporters/cypress-cloud. Now a direct mention link — relevant because currents-dev/www.currents.dev#250 converts /readme/* from a proxy rewrite to a 301.

Not fixed

MD001 heading levels. Technically right — # H1 then ### H3 skips a level. But all six files in resources/reporters/currents-cmd/ use ### with zero ##:

currents-api.md      H2:0 H3:1
currents-cache.md    H2:0 H3:3
currents-cancel.md   H2:0 H3:5
currents-convert.md  H2:0 H3:4
currents-upload.md   H2:0 H3:2
README.md            H2:0 H3:4

Fixing this one file alone makes it the odd one out; fixing all six is unrelated to this PR. Worth a separate cleanup if the lint rule is being enforced.

Verification

All 9 YAML blocks in the changed files parse. No broken relative links. All new external links return 200 directly (no redirect hop). Redirect map still validates: 67 entries, no duplicate keys, no targets missing on disk.

Comment thread resources/reporters/currents-cmd/currents-cancel.md Outdated

@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: 3

🤖 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 `@resources/reporters/currents-cmd/currents-cancel.md`:
- Around line 75-85: Update the cancellation documentation around the GitLab
after_script example to state that graceful cancellation requires GitLab 17.0+
and GitLab Runner 16.10+. Document that pending and force-canceled jobs skip
after_script, so npx currents cancel is not guaranteed for every cancellation,
while preserving the existing timeout limitation.
- Line 38: Update the documentation sentence describing the generated ID for
unrecognized CI providers so it states that a separate “currents cancel”
invocation cannot recover the value, replacing the claim that it never leaves
the reporting process. Keep the surrounding explanation and guidance about
explicitly setting CURRENTS_CI_BUILD_ID unchanged.
- Around line 69-70: Update the CURRENTS_CI_BUILD_ID variable configuration so
each GitLab job retry produces a distinct, retry-aware build ID while remaining
identical across all shards of that run. Use a new pipeline identifier or
combine CI_PIPELINE_ID with a retry discriminator such as CI_JOB_RETRY, ensuring
retries cannot reuse a completed Currents run.
🪄 Autofix

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3910b77a-7a42-4bb1-9608-27f81e32d41f

📥 Commits

Reviewing files that changed from the base of the PR and between 879989b and d94f467.

📒 Files selected for processing (5)
  • dashboard/runs/cancel-run.md
  • getting-started/ci-setup/github-actions/cancel-runs.md
  • getting-started/ci-setup/playwright-circleci.md
  • getting-started/other-frameworks/cypress/ci-setup/cypress-circleci.md
  • resources/reporters/currents-cmd/currents-cancel.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • getting-started/other-frameworks/cypress/ci-setup/cypress-circleci.md
  • getting-started/ci-setup/playwright-circleci.md

Comment thread resources/reporters/currents-cmd/currents-cancel.md Outdated
Comment thread resources/reporters/currents-cmd/currents-cancel.md
Comment thread resources/reporters/currents-cmd/currents-cancel.md
Follow-up review on the GitLab example raised three things the page did
not say:

- CURRENTS_CI_BUILD_ID: $CI_PIPELINE_ID is shared across a pipeline's jobs,
  which is what a CI build id needs, but it does not change when a single
  job is retried. That contradicts the guidance in ci-build-id.md to
  include a retry identifier, so the caveat is now stated with the two ways
  out: re-run the pipeline, or append a per-attempt value.
- after_script only runs on cancellation from GitLab 17.0 and Runner 16.10;
  before that the job just stops. Pending and force-cancelled jobs skip it
  on every version. Those runs still end at the inactivity timeout.
- CURRENTS_RECORD_KEY is a credential and the example passed it as an
  ordinary pipeline variable. Now says to mask it, and protect it where the
  branch policy allows.

Also replaced "never leaves the reporting process" in the CI build id
warning: the point is that a separate currents cancel invocation cannot
recover the generated value, which is what the sentence now says.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vBAvmWyyJsE1eTnxXL2XP
@agoldis

agoldis commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Second pass — thanks, the follow-up round caught real things. Four applied in the latest commit, two I'm pushing back on.

Applied

CI_PIPELINE_ID is not retry-aware (CodeRabbit, Major). Correct, and it contradicted this repo's own guidance — guides/parallelization-guide/ci-build-id.md says "if you are generating CI Build ID manually, please make sure to include the retry/attempt identifier." Added the caveat with the two ways out: re-run the pipeline, or append a per-attempt value. I did not invent a GitLab variable for the discriminator, because GitLab has no pipeline-level attempt counter to point at.

after_script cancellation prerequisites (CodeRabbit). Verified before writing version numbers into docs — GitLab 17.0 + Runner 16.10 is right; earlier versions stop the job without running after_script. Also covered the two cases that skip it on any version: pending jobs never start, and force cancel terminates immediately. Those runs end at the inactivity timeout.

Masking CURRENTS_RECORD_KEY (Baz). Fair — it's a credential and the example passed it as an ordinary pipeline variable. Now says to mask it and protect it where the branch policy allows, and notes CURRENTS_PROJECT_ID needs neither.

"never leaves the reporting process" (CodeRabbit). Reworded to say what actually matters: a separate currents cancel invocation cannot recover the generated value.

Not applying

api/api-keys lands on the wrong page (Baz, marked high severity). The premise doesn't hold on three counts:

  1. resources/api/api-keys.md does not exist — that dead target is precisely what this PR fixes. Reverting would restore a 404.
  2. dashboard/administration/api-keys.md is the API key documentation, not permission-management instructions. Its description: "Create and manage API keys to access the Currents REST API, MCP server, and integrations."
  3. The comment says CLAUDE.md and AGENTS.md "require" a site-level redirect instead. They say the opposite — both list, verbatim: "Redirects: Manage URL redirects in .gitbook.yaml." There is no such rule in either file.

Duplicate redirect key dashboard/runs/run-status (Baz). Not duplicated — two different keys that happen to share a target:

line 35:  runs/run-status:            dashboard/analytics/run-status.md
line 60:  dashboard/runs/run-status:  dashboard/analytics/run-status.md

Both old URLs are real and both need mapping. yaml.safe_load returns all 67 entries with no key collision; a genuine duplicate would silently drop one and the count would come up short.

Verification

Both YAML blocks parse, no broken relative links, redirect map still 67 entries with no duplicate keys and no targets missing on disk. #64 resynced on top.

Sources for the GitLab behaviour: runner!2350, epic 10158, 17.0 breaking change.

@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: 1

🤖 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 `@resources/reporters/currents-cmd/currents-cancel.md`:
- Line 88: Update the GitLab cancellation documentation around the guarded
after_script to require GitLab 17.0 and GitLab Runner 16.11.1 or later for
invoking npx currents cancel. Mention Runner 16.10 only when describing
force-cancel behavior, and preserve the existing notes about pending
cancellations and run-timeouts.
🪄 Autofix

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3e36d9bc-645d-424f-b7ef-78fcd2829964

📥 Commits

Reviewing files that changed from the base of the PR and between d94f467 and 9e78b50.

📒 Files selected for processing (1)
  • resources/reporters/currents-cmd/currents-cancel.md

Comment thread resources/reporters/currents-cmd/currents-cancel.md Outdated
The version note named GitLab Runner 16.10, which is when after_script
started running on cancellation — but on 16.10 $CI_JOB_STATUS still reads
"failed" while the job is cancelling, so the guard in the example never
matches. The combination the example actually needs is GitLab 17.0 with
Runner 16.11.1, generally available in GitLab 17.3.

Headings: the page went from H1 straight to H3. I previously left this
alone on the grounds that the other files in currents-cmd/ shared the
pattern, which was the wrong reason — currents-convert.md and
currents-upload.md carry four H1s each, so the directory has no single
convention to preserve. Fixed here; the rest is a separate cleanup.

Anchors are derived from heading text, not level, so no inbound links
change. There are no #anchor references to this page in the repo either.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vBAvmWyyJsE1eTnxXL2XP
Comment thread resources/reporters/currents-cmd/currents-cancel.md
Comment thread resources/reporters/currents-cmd/currents-cancel.md Outdated
The previous wording — "append a value that changes per attempt" — did not
say where to set it. Applying a discriminator to the reporting command
alone leaves after_script reading the unsuffixed pipeline-level value, so
the cancel would look for a different run than the one recorded. The note
now says to set it in variables:, where both script and after_script read
it, and gives the two real options: $CI_JOB_ID when one job reports the
whole run, or re-running the pipeline when the run is split across
parallel jobs, since GitLab has no variable that is both per-attempt and
shared by every job.

Also link the GitHub Actions snippet to cancel-runs.md. The snippet grew a
jobs: wrapper in this PR so it could show job-scoped env, which brought it
closer to the full workflow on that page; naming one page as the one to
change keeps them from drifting.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vBAvmWyyJsE1eTnxXL2XP
The wording I added over the review rounds drifted from the house style.
Applied the brand kit and humanizer rules to my own sentences only:

- Removed every em dash from the prose I wrote. The brand kit rules them
  out; commas and full stops cover all six cases.
- Split the long sentences. The CI build id warning ran four clauses deep
  before it reached the point.
- Dropped the "which is what a CI build id needs" construction, which had
  crept into three separate paragraphs.
- Second person where the reader is the one acting: "whatever value you
  pick", "your branch policy", "set it yourself".
- Dropped the bold on masked. GitLab's setting is called Masked, so the
  word carries itself.

No technical content changed. Version numbers, variable names and the
GitLab behaviour all read the same as before.

Pre-existing em dashes in these files are untouched; they are not mine to
rewrite in this PR.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vBAvmWyyJsE1eTnxXL2XP

@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: 2

🤖 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 `@resources/reporters/currents-cmd/currents-cancel.md`:
- Line 94: Update the surrounding prose in the documentation to use one
consistent spelling of “canceled,” while preserving the exact GitLab value
`$CI_JOB_STATUS == "canceled"` unchanged.
- Line 38: Update the missing-identifier explanation in the currents cancel
documentation: state that when both CURRENTS_CI_BUILD_ID and CURRENTS_RUN_ID are
unset, the command rejects with a missing required configuration error. Remove
the inaccurate claims about regenerating an automatic CI build ID and reporting
that no run exists.
🪄 Autofix

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7ec87df0-0c9d-4020-a466-5925e3da528d

📥 Commits

Reviewing files that changed from the base of the PR and between 9e78b50 and 2a93dc4.

📒 Files selected for processing (3)
  • dashboard/runs/cancel-run.md
  • getting-started/ci-setup/github-actions/cancel-runs.md
  • resources/reporters/currents-cmd/currents-cancel.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • dashboard/runs/cancel-run.md
  • getting-started/ci-setup/github-actions/cancel-runs.md

Comment thread resources/reporters/currents-cmd/currents-cancel.md Outdated
Comment thread resources/reporters/currents-cmd/currents-cancel.md Outdated
The currents-write-documentation skill exists now. Re-checked my prose
against it and found four things the brand kit does not cover:

- Two hints in a row, which the skill calls a sign the page structure is
  wrong. The version requirement was never a warning; it is a prerequisite,
  so it moves into prose next to the mechanism it constrains, leaving one
  warning hint for the retry caveat.
- Sentences opening with a bare This, It or That pointing at the previous
  idea. Five of them, most introduced when I shortened sentences last time.
  Each now names its subject.
- CI Build ID was written three ways across the docs. The dominant form is
  CI Build ID at 61 uses, so this page now uses it throughout. Normalised
  the two pre-existing lowercase instances as well, since a half-cased page
  is what the one-term-per-thing rule is meant to prevent.
- "would read them as empty" and "would otherwise print the key" are
  conditional; the docs use present tense for behavior.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vBAvmWyyJsE1eTnxXL2XP
agoldis and others added 2 commits August 8, 2026 01:08
The hint ran five sentences and ninety words before the reader reached the
thing to do, which was the last sentence. It now opens with the
instruction, then the failure it prevents: three sentences, none over
twenty words.

Dropped the example of a generated value (pw:owner/repo-16873-1). The two
forms are still named, and the detail belongs in ci-build-id.md, which the
section above already links.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vBAvmWyyJsE1eTnxXL2XP
One paragraph carried the version requirement, the Runner 16.10 caveat,
the two cases that skip after_script, and the timeout fallback. Five
sentences, one of them explaining three separate things. Now three
paragraphs of two sentences each: how the guard works, what versions it
needs, and when it does not run.

Dropped "GitLab 17.3 made the behavior generally available". On 17.0 with
Runner 16.11.1 the guard works, so the flag's removal date does not change
what the reader does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vBAvmWyyJsE1eTnxXL2XP
@agoldis
agoldis merged commit f47fa3d into main Aug 8, 2026
4 checks passed
agoldis added a commit that referenced this pull request Aug 8, 2026
Search Console lists 91 crawled 404s on docs.currents.dev. #63 covers ten
of the ones that are real page moves; these twelve are the remainder,
including every path still reachable from currents.dev/readme/*.

Four are bare CI-provider paths (ci-setup/circleci, ci-setup/azure-devops,
ci-setup/bitbucket, ci-setup/jenkins-playwright) that predate flattening
the ci-setup tree. Files with those names still exist at the repo root but
are absent from SUMMARY.md, so GitBook does not serve them — hence the
404. Adding redirects is additive and leaves those files alone; whether
the unlisted ci-setup/ directory should exist at all is a separate
question.

The rest are single pages that moved section: currents-cli to
resources/reporters, jira to resources/integrations, currents-actions and
the orchestrated re-run guide to their current homes.

Every target verified to return 200 on docs.currents.dev, and every target
file verified to exist on disk. 79 entries total, no duplicate keys.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vBAvmWyyJsE1eTnxXL2XP
agoldis added a commit that referenced this pull request Aug 8, 2026
Search Console lists 91 crawled 404s on docs.currents.dev. #63 covers ten
of the ones that are real page moves; these twelve are the remainder,
including every path still reachable from currents.dev/readme/*.

Four are bare CI-provider paths (ci-setup/circleci, ci-setup/azure-devops,
ci-setup/bitbucket, ci-setup/jenkins-playwright) that predate flattening
the ci-setup tree. Files with those names still exist at the repo root but
are absent from SUMMARY.md, so GitBook does not serve them — hence the
404. Adding redirects is additive and leaves those files alone; whether
the unlisted ci-setup/ directory should exist at all is a separate
question.

The rest are single pages that moved section: currents-cli to
resources/reporters, jira to resources/integrations, currents-actions and
the orchestrated re-run guide to their current homes.

Every target verified to return 200 on docs.currents.dev, and every target
file verified to exist on disk. 79 entries total, no duplicate keys.


Claude-Session: https://claude.ai/code/session_013vBAvmWyyJsE1eTnxXL2XP

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

## Cancelling from other CI providers

The command only needs the record key, the project and the CI Build ID, so the same step works anywhere. Set the CI Build ID for the whole pipeline, so the reporting job and the cancelling step use the same value. GitLab CI, for example:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

GitLab cleanup can run wrong CLI

The documented GitLab CI step runs npx currents cancel without installing @currents/cmd, so npm may fetch the unpinned currents package at latest and cleanup can prompt, fail, or execute unrelated code — should we install @currents/cmd explicitly or use npx --yes --package @currents/cmd@1.10.0 currents cancel?

Severity

Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents
Before applying, verify this suggestion against the current code. In
`resources/reporters/currents-cmd/currents-cancel.md` around lines 68-78, update the
GitLab CI cancellation step that invokes `npx currents cancel`. Ensure it explicitly
installs and pins `@currents/cmd`—for example by using `npx --yes --package
@currents/cmd@1.10.0 currents cancel`, or an equivalent prior install—so the
documented command is non-interactive, deterministic, and cannot fetch the unrelated
`currents` package.


The guard relies on GitLab running `after_script` on cancellation. No `when:` value matches a cancelled job, including `when: on_failure`, which fires only on failure.

Cancelling from `after_script` requires GitLab 17.0 with GitLab Runner 16.11.1, the first versions where `$CI_JOB_STATUS` reads `canceled`. Runner 16.10 runs `after_script` on cancellation but reports `failed`, so the guard never matches.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The documented GitLab 17.0 minimum overstates when the after_script guard actually runs: CI_JOB_STATUS=canceled sat behind the ci_canceling_status feature flag from 17.0–17.2 and only became GA in 17.3, so on self-managed installations without the flag enabled, npx currents cancel never fires and the Currents run times out — should we document the flag requirement for 17.0–17.2 or just raise the documented minimum to GitLab 17.3?

Severity web_search

Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents
Before applying, verify this suggestion against the current code. In
resources/reporters/currents-cmd/currents-cancel.md around line 85, update the GitLab
`after_script` cancellation guard documentation: `CI_JOB_STATUS=canceled` was behind the
`ci_canceling_status` feature flag in GitLab 17.0–17.2 and only became generally
available in 17.3, so the guard is not guaranteed to run on self-managed installations
in that range unless the flag is enabled. Either document that the flag must be enabled
for 17.0–17.2, or narrow the recommendation to require GitLab 17.3+ as the minimum, so
the stated prerequisites accurately reflect when `npx currents cancel` will actually
run.

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