Skip to content

Fix TypeScript error: parseInt receiving string | undefined in effective_tokens.cjs#33756

Merged
pelikhan merged 5 commits into
mainfrom
copilot/fix-lint-js
May 21, 2026
Merged

Fix TypeScript error: parseInt receiving string | undefined in effective_tokens.cjs#33756
pelikhan merged 5 commits into
mainfrom
copilot/fix-lint-js

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

process.env.GH_AW_EFFECTIVE_TOKENS returns string | undefined, but parseInt only accepts string, causing TS2345 and failing the js-typecheck CI job.

Change

Added a nullish coalescing fallback so the type satisfies parseInt's signature:

// Before
const raw = process.env.GH_AW_EFFECTIVE_TOKENS;

// After
const raw = process.env.GH_AW_EFFECTIVE_TOKENS ?? "";

Copilot AI and others added 2 commits May 21, 2026 13:15
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review May 21, 2026 13:35
Copilot AI review requested due to automatic review settings May 21, 2026 13:35
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot merge main and recompile, fix conflicts

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR resolves a TypeScript typecheck failure caused by passing string | undefined from process.env into parseInt in effective_tokens.cjs. In addition, it updates numerous generated workflow lockfiles where the embedded AWF firewall config JSON has changed (model alias mappings expanded).

Changes:

  • Default GH_AW_EFFECTIVE_TOKENS to an empty string to satisfy parseInt’s string parameter type in JS typechecking.
  • Update embedded AWF config JSON in many .lock.yml workflows (notably model alias mappings such as antigravity, gemini-3.1-*, summarization, etc.).
Show a summary per file
File Description
actions/setup/js/effective_tokens.cjs Add nullish fallback so parseInt receives a string for TS typechecking.
.github/workflows/workflow-health-manager.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/workflow-generator.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/video-analyzer.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/test-workflow.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/test-quality-sentinel.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/test-project-url-default.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/test-dispatcher.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/super-linter.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/slide-deck-maintainer.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/security-review.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/security-compliance.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/repo-tree-map.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/refiner.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/q.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/pr-description-caveman.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/poem-bot.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/plan.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/pdf-summary.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/metrics-collector.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/mergefest.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/lint-monster.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/jsweep.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/gpclean.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/dev.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/dev-hawk.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/daily-team-status.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/craft.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/contribution-check.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/code-simplifier.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/ci-coach.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/brave.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/bot-detection.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/archie.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/ace-editor.lock.yml Update embedded AWF config JSON (model alias map changes).
.github/workflows/example-permissions-warning.lock.yml Update embedded AWF config JSON (model alias map changes).

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 123/234 changed files
  • Comments generated: 1

Comment on lines 824 to +828
@@ -825,7 +825,7 @@ jobs:
export GH_AW_NODE_BIN
export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK"
(umask 177 && touch /tmp/gh-aw/agent-stdio.log)
printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.49/awf-config.schema.json","network":{"allowDomains":["*.grafana.net","*.sentry.io","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","github.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000,"models":{"agent":["sonnet-6x","gpt-5.4","gpt-5","gemini-pro","haiku","any"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"auto":["large"],"claude":["agent","sonnet-6x","haiku","any"],"codex":["agent","gpt-5-codex","gpt-5","any"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex"],"computer-use":["copilot/*computer-use*","google/*computer-use*","gemini/*computer-use*","openai/*computer-use*"],"copilot":["agent","gpt-5.4","sonnet","gpt-5","any"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","gemini/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini":["agent","gemini-pro","gemini-flash","any"],"gemini-3-flash":["copilot/gemini-3*flash*","google/gemini-3*flash*","gemini/gemini-3*flash*"],"gemini-3-pro":["copilot/gemini-3*pro*","google/gemini-3*pro*","gemini/gemini-3*pro*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"],"gemini-flash-lite":["copilot/gemini-*flash*lite*","google/gemini-*flash*lite*","gemini/gemini-*flash*lite*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"gpt-5.4":["copilot/gpt-5.4*","openai/gpt-5.4*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite"],"opus":["copilot/*opus*","anthropic/*opus*"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"robotics":["copilot/*robotics*","google/*robotics*","gemini/*robotics*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4-5-*","anthropic/*sonnet-4-5-*","copilot/*sonnet-4-6*","anthropic/*sonnet-4-6*"],"vision":["copilot/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.25.49"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json"
printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.49/awf-config.schema.json","network":{"allowDomains":["*.grafana.net","*.sentry.io","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","github.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000,"models":{"agent":["sonnet-6x","gpt-5.4","gpt-5","gemini-pro","haiku","any"],"antigravity":["copilot/antigravity*","google/antigravity*","gemini/antigravity*"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"auto":["large"],"claude":["agent","sonnet-6x","haiku","any"],"codex":["agent","gpt-5-codex","gpt-5","any"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex"],"computer-use":["copilot/*computer-use*","google/*computer-use*","gemini/*computer-use*","openai/*computer-use*"],"copilot":["agent","gpt-5.4","sonnet","gpt-5","any"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","gemini/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"gemini":["agent","gemini-pro","gemini-flash","any"],"gemini-3-flash":["copilot/gemini-3*flash*","google/gemini-3*flash*","gemini/gemini-3*flash*"],"gemini-3-pro":["copilot/gemini-3*pro*","google/gemini-3*pro*","gemini/gemini-3*pro*"],"gemini-3.1-flash":["copilot/gemini-3.1*flash*","google/gemini-3.1*flash*","gemini/gemini-3.1*flash*"],"gemini-3.1-pro":["copilot/gemini-3.1*pro*","google/gemini-3.1*pro*","gemini/gemini-3.1*pro*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"],"gemini-flash-lite":["copilot/gemini-*flash*lite*","google/gemini-*flash*lite*","gemini/gemini-*flash*lite*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"gpt-5.4":["copilot/gpt-5.4*","openai/gpt-5.4*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite"],"opus":["copilot/*opus*","anthropic/*opus*"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"robotics":["copilot/*robotics*","google/*robotics*","gemini/*robotics*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4-5-*","anthropic/*sonnet-4-5-*","copilot/*sonnet-4-6*","anthropic/*sonnet-4-6*"],"summarization":["haiku","gpt-5-mini","gemini-flash-lite","mini"],"vision":["copilot/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.25.49"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json"
Copilot AI and others added 2 commits May 21, 2026 13:51
# Conflicts:
#	.github/workflows/agent-persona-explorer.lock.yml
#	.github/workflows/daily-cache-strategy-analyzer.lock.yml
#	.github/workflows/daily-fact.lock.yml
#	.github/workflows/daily-observability-report.lock.yml
#	.github/workflows/duplicate-code-detector.lock.yml
#	.github/workflows/grumpy-reviewer.lock.yml
#	.github/workflows/issue-arborist.lock.yml
#	.github/workflows/necromancer.lock.yml
#	.github/workflows/schema-feature-coverage.lock.yml
#	.github/workflows/smoke-call-workflow.lock.yml
#	.github/workflows/smoke-codex.lock.yml

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 21, 2026

@copilot merge main and recompile, fix conflicts

Done — merged main, resolved conflicts in the lock files (taking origin/main), and ran gh aw compile to recompile all workflows. Typecheck still passes. Note: smoke-claude.md has a pre-existing compile error on main (required-labels used outside a valid safe-outputs context) that is unrelated to this PR.

Copilot AI requested a review from pelikhan May 21, 2026 13:55
@pelikhan pelikhan merged commit 9ce596d into main May 21, 2026
15 of 18 checks passed
@pelikhan pelikhan deleted the copilot/fix-lint-js branch May 21, 2026 14:02
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