Skip to content

Read the latest view counts from the staged stats - #584

Merged
Alejandro Lopez (soyalejolopez) merged 2 commits into
masterfrom
read-live-stats-from-staging
Nov 2, 2026
Merged

Alejandro Lopez (soyalejolopez) merged 2 commits into
masterfrom
read-live-stats-from-staging

Conversation

@soyalejolopez

Copy link
Copy Markdown
Member

The daily workflow keeps a fresh resource-stats.json on automation/traffic-stats-staging, but publishing it to master takes a weekly pull request that Actions cannot open under the org's policy, so the site's counts were only as fresh as the last merged weekly PR.

The catalog and the resource pages now also read the staged file from raw.githubusercontent.com (assets/live-stats.js) and take only its view counts. The committed file stays the source for everything else and the fallback whenever the staged file cannot be read in 1.5 seconds, is older than the committed file, or was counted by a different method (sources.views). No token or PR is needed.

  • The privacy notice discloses the request (no cookies, no referrer).
  • Tests cover accept/reject rules, fetch failures, the URL matching the workflow's staging branch, and the wiring in the catalog and the resource pages.
  • traffic-data/README.md documents the behavior and what to change if the branch is renamed.
  • Regenerated the 58 resource pages for the new script tag.

The daily workflow keeps a fresh resource-stats.json on automation/traffic-stats-staging, but
publishing it to master takes a weekly pull request that Actions cannot open under the org's policy,
so the site's counts were only as fresh as the last merged weekly PR.

The catalog and the resource pages now also read the staged file from raw.githubusercontent.com
(assets/live-stats.js) and take only its view counts. The committed file stays the source for
everything else and the fallback whenever the staged file cannot be read in 1.5 seconds, is older than
the committed file, or was counted by a different method (sources.views). No token or PR is needed.

- The privacy notice discloses the request (no cookies, no referrer).
- Tests cover accept/reject rules, fetch failures, the URL matching the workflow's staging branch,
  and the wiring in the catalog and the resource pages.
- traffic-data/README.md documents the behavior and what to change if the branch is renamed.
- Regenerated the 58 resource pages for the new script tag.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🛰️ PR Sweeper report

Risk: 🟢 LOW · Security gate: ✅ passing · Files: 65

🔒 Automated guardrails (authoritative)

Category Location Finding
ℹ️ scope — Change(s) outside known content roots: assets/live-stats.js, assets/privacy-notice.js, assets/resource-page.js, index.html, r/add-engagegroupadmins/index.html, r/agent-365-enablement-checklist/index.html, r/agent-365-lifecycle-atlas/index.html, r/agent-brainstorming-template/index.html, r/agents-cost-calculator/index.html, r/ai-council/index.html ….
ℹ️ scope — Large PR: 65 files changed. Smaller PRs are easier to review.

🤖 Dual-model AI review (advisory)

AI review unavailable for this run (models not reachable or no diff). Guardrails above are unaffected.

  • GPT-class reviewer (openai/gpt-5): skipped — request failed: Unexpected token 'O', "OK
    " is not valid JSON
  • Deep-reasoning reviewer (openai/o3): skipped — request failed: Unexpected token 'O', "OK
    " is not valid JSON

The automated guardrails are authoritative and gate the security status. The AI review is advisory and never auto-merges. Thanks for contributing to FastTrack! 🛩️

@github-actions github-actions Bot added sweeper:risk-low PR Sweeper: low risk sweeper:scope-review PR Sweeper: scope/sensitive-path review labels Nov 2, 2026
CodeQL flags substring tests on URLs (js/incomplete-url-substring-sanitization). These are test
assertions, not sanitization, but a substring test on a URL also proves little about the host it
names. Compare against the exact set of hrefs on each page, and check the privacy notice against the
set of hostnames it names, using the host of the live stats URL instead of a hard-coded string.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@soyalejolopez
Alejandro Lopez (soyalejolopez) merged commit 5ae71c4 into master Nov 2, 2026
8 checks passed
@soyalejolopez
Alejandro Lopez (soyalejolopez) deleted the read-live-stats-from-staging branch November 2, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sweeper:risk-low PR Sweeper: low risk sweeper:scope-review PR Sweeper: scope/sensitive-path review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants