Open-source AI browser agent for Chrome and Firefox (monorepo) ðŸ§
JavaScript ai-agentai-agentsai-toolsbrowser-aibrowser-automationbrowser-extensionchrome-aichrome-devtoolschrome-extensionchrome-extensionsfirefox-addonfirefox-addonsfirefox-extensionfirefox-extensionsgemmagemma4minimaxoffline-aioffline-llmqwen
ci: shard Build and Package tests across parallel jobs
Codex release-state test400693440957
diff --git a/.github/workflows/main.yml b/.github/workflows/main.ymlindex c668908df..19ed60f84 100644--- a/.github/workflows/main.yml+++ b/.github/workflows/main.yml@@ -11,8 +11,20 @@ concurrency:cancel-in-progress: falsejobs:- build:+ test:+ name: test (${{ matrix.shard }})runs-on: ubuntu-latest+ strategy:+ fail-fast: true+ matrix:+ shard:+ - quick+ - runtime-unit+ - browser-a+ - browser-b1+ - browser-b2+ - browser-c+ - tailsteps:- uses: actions/checkout@v4with:@@ -34,6 +46,49 @@ jobs:git config user.name "github-actions[bot]"git config user.email "41898282+github-actions[bot]@users.noreply.github.com"+ - name: Bump patch version+ run: node scripts/bump-version.mjs++ - name: Update changelog+ run: |+ version=$(node -p "require('./package.json').version")+ mkdir -p .release+ previous_tag=$(git describe --tags --abbrev=0 2>/dev/null || true)+ if [ -n "$previous_tag" ]; then+ base_ref="$previous_tag"+ else+ base_ref=$(git rev-list --max-parents=0 HEAD)+ fi+ git log --no-merges --pretty=format:'- %s' "$base_ref..HEAD" > .release/changelog-body.md+ if [ ! -s .release/changelog-body.md ]; then+ printf '%s\n' '- Packaged the current extension fixes for browser stores.' > .release/changelog-body.md+ fi+ node scripts/update-changelog.mjs \+ --version "$version" \+ --date "$(date -u +%F)" \+ --notes-file .release/changelog-body.md++ - name: Run ${{ matrix.shard }} shard+ run: npm run test:shard:${{ matrix.shard }}++ release:+ runs-on: ubuntu-latest+ needs: test+ steps:+ - uses: actions/checkout@v4+ with:+ fetch-depth: 0+ persist-credentials: true++ - uses: actions/setup-node@v4+ with:+ node-version: 22++ - name: Configure git author+ run: |+ git config user.name "github-actions[bot]"+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"+- name: Build patch release notesrun: |mkdir -p .release@@ -73,14 +128,21 @@ jobs:version=$(node -p "require('./package.json').version")git commit -m "dist: rebuild submission zips for v${version}"- - name: Test- run: npm test-- - name: Test fixtures- run: npm run test:fixtures-- name: Push release commits- run: git push origin HEAD:${{ github.ref_name }}+ run: |+ pushed=false+ for attempt in 1 2 3 4 5; do+ if git pull --rebase origin "${{ github.ref_name }}" && git push origin "HEAD:${{ github.ref_name }}"; then+ pushed=true+ break+ fi+ echo "Push attempt $attempt failed, retrying..."+ sleep 10+ done+ if [ "$pushed" != "true" ]; then+ echo "Push failed after 5 attempts" >&2+ exit 1+ fi- name: Get release metadataid: release_meta@@ -96,7 +158,7 @@ jobs:tag_name: v${{ steps.release_meta.outputs.VERSION }}target_commitish: ${{ steps.release_meta.outputs.SHA }}name: Release v${{ steps.release_meta.outputs.VERSION }}- generate_release_notes: true+ body_path: .release/changelog-body.mdfail_on_unmatched_files: truefiles: |dist/*.zipdiff --git a/.github/workflows/minor-release.yml b/.github/workflows/minor-release.ymlindex fed3a4a4f..ec1bf2566 100644--- a/.github/workflows/minor-release.yml+++ b/.github/workflows/minor-release.yml@@ -176,7 +176,20 @@ jobs:run: npm run test:fixtures- name: Push release commits- run: git push origin HEAD:${{ github.ref_name }}+ run: |+ pushed=false+ for attempt in 1 2 3 4 5; do+ if git pull --rebase origin "${{ github.ref_name }}" && git push origin "HEAD:${{ github.ref_name }}"; then+ pushed=true+ break+ fi+ echo "Push attempt $attempt failed, retrying..."+ sleep 10+ done+ if [ "$pushed" != "true" ]; then+ echo "Push failed after 5 attempts" >&2+ exit 1+ fi- name: Get final release commitid: final_releasediff --git a/package.json b/package.jsonindex 46f9aac18..9b0ded485 100644--- a/package.json+++ b/package.json@@ -84,7 +84,14 @@"test:quality:media": "node test/quality/generative-media-mv3.mjs","test:quality:whatsapp": "node test/quality/whatsapp-contact-matrix.mjs","test:chat-draft-recovery": "node --test test/native-chat-pre-enter-draft.mjs test/chat-draft-dispatch-ownership.mjs && node test/quality/native-chat-presubmit-mv3.mjs",- "test:upload-owner": "node --test test/page-monitor-upload-owner.mjs"+ "test:upload-owner": "node --test test/page-monitor-upload-owner.mjs",+ "test:shard:quick": "npm run test:cms && npm run test:markdown && npm run test:generative-media && npm run test:systemone && npm run test:systemone:fast && node --test test/browser-dialogs.mjs test/capsolver-cloud-broker.mjs test/captcha-providers.mjs test/captcha-weighted-fallback.mjs test/captcha-hcaptcha-providers.mjs test/captcha-native-providers.mjs test/captcha-runtime-policy.mjs test/captcha-callback-bridge.mjs test/captcha-bridge-registration.mjs test/captcha-aws-recovery.mjs test/captcha-documented-contracts.mjs test/huggingface-signup-recovery.mjs test/trace-full-export.mjs test/feedback-traces.mjs && npm run test:firefox-bidi && npm run test:billing-notice && npm run test:compass-quota && npm run test:provider-limits && npm run test:provider-catalog && npm run test:provider-instances:ui && npm run test:openrouter-capabilities && npm run test:anthropic && npm run test:accessibility-tree-benchmark && npm run test:toolbar-guard && npm run test:cloud-bridge-approval && npm run test:discord && npm run test:pdf-read && npm run test:pdf-selection && npm run test:social-contract && npm run test:safesocial && npm run test:build-unpacked && npm run test:attachment-drop && npm run test:workflow-editor && node --test test/profile-sync-stats.mjs && node --test test/memcode-recall.mjs",+ "test:shard:runtime-unit": "node --test test/agent-lifecycle.mjs test/runtime-startup.mjs test/run-ui-scheduled-lifecycle.mjs test/transport-deadlines.mjs test/cdp-worker-restart.mjs test/cdp-clear-receipt.mjs test/conversation-persistence.mjs test/context-live-tool-group.mjs test/integration-races.mjs test/watch-completion-checkpoint.mjs test/runtime-model-identity.mjs test/provider-message-privacy.mjs test/runtime-task-authority.mjs test/planner-repair-authority.mjs test/runtime-progress-continuation.mjs test/chat-resume-chain.mjs test/chat-resume-completion.mjs test/native-chat-execution-ledger.mjs test/chat-send-dispatch-result.mjs test/chat-reply-dedup-race.mjs test/memcode-lifecycle.mjs test/runtime-peer-review.mjs test/read-continuation-schema.mjs test/completion-submit-acknowledgement.mjs test/completion-live-status.mjs test/completion-iframe-submit.mjs test/completion-semantic-commit.mjs test/completion-diagnostics.mjs test/mastodon-publication.mjs test/calculator.mjs test/chat-recovery-protocol.mjs test/chat-pending-reconciliation.mjs test/semantic-page-retry.mjs test/pdf-detection.mjs test/runtime-lifecycle.mjs test/collection-read-progress.mjs test/network-lifecycle.mjs test/text-write-cancellation.mjs test/trusted-field-preparation.mjs test/draftjs-text.mjs test/draftjs-native-editor.mjs test/contenteditable-beforeinput.mjs test/trusted-field-preparation-ownership.mjs test/chat-steering.mjs test/steering-revision-recovery.mjs test/pending-clarification-hydration.mjs test/permission-steering-wakeup.mjs test/pure-calculation-reply.mjs test/pure-calculation-tools.mjs test/page-feedback.mjs test/page-feedback-progress.mjs test/page-feedback-policy.mjs test/page-feedback-transport-races.mjs test/page-feedback-recovery.mjs test/telegram-read-preparation-agent.mjs test/media-download-agent-handler.mjs test/code-scanning-url-recipient.mjs test/apocalypse-comm-parsing.mjs test/apocalypse-scalar-decoding.mjs test/bitgpu-chat-security.mjs test/social-media-url-upgrades.mjs test/downloaded-file-saved-bytes.mjs test/downloaded-file-local-probe.mjs test/formless-verification-recovery.mjs test/file-upload-accept.mjs test/file-upload-accept-agent.mjs test/workflow-route-generic-completion.mjs test/completion-current-execution-evidence.mjs",+ "test:shard:browser-a": "node test/ui-content-lifecycle.mjs && node --test test/native-telegram-chat.mjs test/native-telegram-recipient.mjs test/telegram-native-baseline.mjs test/telegram-native-latest.mjs test/native-chat-pre-enter-draft.mjs test/chat-draft-dispatch-ownership.mjs test/native-telegram-alias-preparation.mjs test/telegram-read-preparation-content.mjs test/queued-composer-ownership.mjs test/onboarding-provider-ready.mjs test/workflow-native-targets.mjs test/native-whatsapp-chat.mjs test/native-chat-context-identity.mjs test/native-whatsapp-contact.mjs test/whatsapp-native-bootstrap.mjs test/whatsapp-drawer-identity.mjs test/whatsapp-read-latest.mjs test/whatsapp-read-preparation.mjs test/whatsapp-chat-completion.mjs test/whatsapp-chat-restart.mjs test/chat-goal-lifecycle.mjs test/chat-completion.mjs test/chat-generic-dispatch.mjs test/completion-live-status-browser.mjs test/native-confirmation-visibility.mjs test/read-continuation-browser.mjs test/iframe-preparation-focus.mjs test/contenteditable-literal.mjs test/native-chat-empty-editor.mjs test/chat-steering-ui.mjs test/assistant-message-visibility-ui.mjs test/page-monitor-ui.mjs test/page-monitor-dialog.mjs test/page-monitor-dialog-native.mjs test/page-monitor-anchored.mjs test/page-monitor-upload-owner.mjs test/page-monitor-native-preparation.mjs test/native-preparation-cold.mjs test/page-monitor-navigation.mjs test/page-monitor-main-owner.mjs test/page-monitor-collateral-controls.mjs test/accessibility-tree-scoped-budget.mjs test/ax-reference-origin.mjs test/page-monitor-decorative-hit.mjs test/social-ui-navigation.mjs test/dropdown-menu-inventory.mjs test/page-monitor-passive-progress.mjs test/media-download-binding.mjs test/media-download-capture-integration.mjs test/social-media-downloader-reinjection.mjs test/upload-file-local-state-guidance.mjs",+ "test:shard:browser-b1": "node test/message-recipient-upload.mjs && node --test test/message-recipient-whatsapp.mjs && node test/quality/integration-mv3.mjs --full-form && node test/quality/literal-calculate-midrun-mv3.mjs && node test/quality/telegram-cold-preparation-mv3.mjs && node test/quality/native-chat-mv3.mjs && node test/quality/native-chat-presubmit-mv3.mjs",+ "test:shard:browser-b2": "node test/quality/whatsapp-contact-matrix.mjs && node test/quality/pdf-detection-mv3.mjs && node test/quality/download-upload-mv3.mjs && node test/quality/downloaded-file-saved-bytes-mv3.mjs && node test/quality/file-upload-accept-mv3.mjs && node test/quality/bulk-resume-mv3.mjs",+ "test:shard:browser-c": "node test/quality/literal-frame-mv3.mjs && node test/quality/mastodon-publication-mv3.mjs && node test/quality/mastodon-deletion-mv3.mjs && node test/quality/anchored-action-mv3.mjs && node test/quality/dropdown-menu-matrix.mjs && node test/quality/mastodon-deletion-navigation-mv3.mjs && node test/quality/semantic-navigation-matrix.mjs && node test/quality/workflow-replay-mv3.mjs && node test/quality/generative-media-mv3.mjs && node test/quality/cdp-worker-restart-mv3.mjs",+ "test:shard:tail": "node test/run.js && node test/selection-scope-restoration.mjs && node scripts/benchmark-offline-relevance.mjs && npm run test:security && npm run test:fixtures"},"devDependencies": {"c8": "^12.0.0",