apify-test-tools 0.10.2-beta.11 → 0.10.2-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/public_platform-tests-claude-investigate-and-fix.yaml +71 -4
- package/.prettierignore +1 -1
- package/CHANGELOG.md +2 -0
- package/dist/test/unit/bin/compiled-cli.d.ts +1 -1
- package/dist/test/unit/bin/compiled-cli.d.ts.map +1 -1
- package/dist/test/unit/bin/compiled-cli.js +12 -5
- package/dist/test/unit/bin/compiled-cli.js.map +1 -1
- package/dist/test/unit/bin/logging.test.js +5 -11
- package/dist/test/unit/bin/logging.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/workflows.md +10 -7
- package/eslint.config.mjs +1 -1
- package/package.json +1 -1
- package/platform-tests-investigate-and-fix/skills/assess-impact/SKILL.md +42 -0
- package/platform-tests-investigate-and-fix/skills/measure-flakiness/SKILL.md +4 -2
- package/test/unit/bin/compiled-cli.ts +11 -5
- package/test/unit/bin/logging.test.ts +6 -10
- package/vitest.config.ts +9 -0
|
@@ -68,14 +68,34 @@ on:
|
|
|
68
68
|
|
|
69
69
|
Before you create a new issue, check whether the `platform-tests-investigate-and-fix:measure-flakiness` skill applies, and follow it if it does.
|
|
70
70
|
|
|
71
|
+
At the end of your investigation, before you create a new issue, follow the `platform-tests-investigate-and-fix:assess-impact` skill.
|
|
72
|
+
|
|
71
73
|
When you create the issue, write it like an incident postmortem: a short summary and impact up top for anyone skimming, full technical detail below for whoever fixes it. Don't water down the engineering detail to make the top readable.
|
|
72
74
|
- Title: short and clean, describing the actual problem in plain terms — no dates, run numbers, or other noise. Prefix it with a conventional-commit-style type, e.g. "fix: blocking issue on detail endpoint".
|
|
73
|
-
- Body, section 1 ("## Summary"): one line stating what's broken plus its impact, in plain language a PM can understand at a glance — no jargon, internal field names, or stack traces (e.g. "Scraping product detail pages fails when a listing has no reviews
|
|
75
|
+
- Body, section 1 ("## Summary"): one line stating what's broken plus its impact, in plain language a PM can understand at a glance — no jargon, internal field names, or stack traces (e.g. "Scraping product detail pages fails when a listing has no reviews").
|
|
74
76
|
- If you measured flakiness, a "## Flakiness" section right after the Summary, as the `measure-flakiness` skill describes.
|
|
77
|
+
- An "## Impact" section under the Flakiness section (or under the Summary if there's none), as the `assess-impact` skill describes.
|
|
75
78
|
- A `---` divider, then section 2 ("## Details"): the engineering bug report — root cause, relevant log lines, links to the failing run, and any other internals an engineer needs. If a single item/request failed among otherwise-good ones, show or link that specific one (e.g. the dataset item index/id, or its matching debug snapshot) rather than just describing the run as failed.
|
|
76
79
|
|
|
77
80
|
If you create a new issue, you MUST write its issue number (just the number, nothing else) to $GITHUB_WORKSPACE/issue-number.txt as the very last thing you do. If you skip creating one because a duplicate already exists, do not create the file.
|
|
78
81
|
description: Prompt given to Claude for the investigation phase. Override to customize how issues are investigated, titled, and described.
|
|
82
|
+
priority_prompt:
|
|
83
|
+
required: false
|
|
84
|
+
type: string
|
|
85
|
+
# The prio prompt here is purposefully vague; you can adjust it to
|
|
86
|
+
# use custom thresholds based on measured impact metrics.
|
|
87
|
+
default: |
|
|
88
|
+
After you create a new issue and before you write its issue number to $GITHUB_WORKSPACE/issue-number.txt, set its Priority field from the failure's impact and flakiness:
|
|
89
|
+
|
|
90
|
+
To do so, exercise your best judgement. Issues marked with higher priority will be reacted to first.
|
|
91
|
+
Here are guidelines:
|
|
92
|
+
- Determine priority based on combined severity and revenue actually at risk: a less severe bug can outrank a more severe one if much more revenue is actually at risk, and vice versa.
|
|
93
|
+
- If the Impact section considers the bug from several points of view, each in its own sub-section, base the priority on the most impactful one.
|
|
94
|
+
- If it helps you, you can base your assessment off priorities of already existing bugs in the repo.
|
|
95
|
+
- Invisible to the user or Test severity always receives lowest priority.
|
|
96
|
+
|
|
97
|
+
Priority is an organization-level issue field. If the revenue actually at risk can't be determined, e.g. the Impact section says "Cannot be determined", leave Priority unset, unless the relative severity is Invisible to the user or Test.
|
|
98
|
+
description: Prompt given to Claude for setting a new issue's Priority field from its impact and flakiness. Override to customize how priority is judged, e.g. to set revenue thresholds.
|
|
79
99
|
secrets:
|
|
80
100
|
ANTHROPIC_API_KEY:
|
|
81
101
|
required: true
|
|
@@ -86,6 +106,12 @@ on:
|
|
|
86
106
|
NPM_TOKEN:
|
|
87
107
|
required: false
|
|
88
108
|
description: Read-only token for installing private npm packages before Claude runs.
|
|
109
|
+
REDASH_API_KEY:
|
|
110
|
+
required: false
|
|
111
|
+
description: Redash API key for measuring the failure's impact — affected runs, high-touch customers and revenue — from Snowflake.
|
|
112
|
+
AGENT_SKILLS_INTERNAL_GITHUB_TOKEN:
|
|
113
|
+
required: false
|
|
114
|
+
description: GitHub token with read access to apify/agent-skills-internal, for installing its redash-analyst plugin.
|
|
89
115
|
|
|
90
116
|
jobs:
|
|
91
117
|
investigate:
|
|
@@ -101,28 +127,69 @@ jobs:
|
|
|
101
127
|
- name: Checkout repository
|
|
102
128
|
uses: actions/checkout@v5
|
|
103
129
|
|
|
130
|
+
- name: Check which optional secrets are set
|
|
131
|
+
id: optional-secrets
|
|
132
|
+
run: |
|
|
133
|
+
echo "agent-skills-token=${{ secrets.AGENT_SKILLS_INTERNAL_GITHUB_TOKEN != '' }}" >> "$GITHUB_OUTPUT"
|
|
134
|
+
echo "redash-api-key=${{ secrets.REDASH_API_KEY != '' }}" >> "$GITHUB_OUTPUT"
|
|
135
|
+
|
|
136
|
+
- name: Checkout internal agent skills
|
|
137
|
+
id: agent-skills-internal
|
|
138
|
+
if: steps.optional-secrets.outputs.agent-skills-token == 'true'
|
|
139
|
+
continue-on-error: true
|
|
140
|
+
uses: actions/checkout@v5
|
|
141
|
+
with:
|
|
142
|
+
repository: apify/agent-skills-internal
|
|
143
|
+
token: ${{ secrets.AGENT_SKILLS_INTERNAL_GITHUB_TOKEN }}
|
|
144
|
+
path: .agent-skills-internal
|
|
145
|
+
sparse-checkout: |
|
|
146
|
+
.claude-plugin
|
|
147
|
+
skills/redash-analyst
|
|
148
|
+
persist-credentials: false
|
|
149
|
+
|
|
150
|
+
- uses: actions/setup-node@v6
|
|
151
|
+
if: steps.optional-secrets.outputs.redash-api-key == 'true'
|
|
152
|
+
with:
|
|
153
|
+
node-version: 24
|
|
154
|
+
|
|
155
|
+
- name: Install Redash MCP server
|
|
156
|
+
if: steps.optional-secrets.outputs.redash-api-key == 'true'
|
|
157
|
+
continue-on-error: true
|
|
158
|
+
working-directory: ${{ runner.temp }}
|
|
159
|
+
run: npm install --prefix redash-mcp --ignore-scripts --no-audit --no-fund @suthio/redash-mcp@0.1.0
|
|
160
|
+
|
|
104
161
|
- name: Run Claude Code
|
|
105
162
|
id: claude
|
|
106
163
|
uses: anthropics/claude-code-action@8251c103ac8c1d761882c86aba1412c7f583c844 # v1.0.213
|
|
107
164
|
env:
|
|
108
165
|
TESTER_APIFY_TOKEN: ${{ secrets.TESTER_APIFY_TOKEN }}
|
|
166
|
+
REDASH_API_KEY: ${{ secrets.REDASH_API_KEY }}
|
|
109
167
|
MAX_FLAKINESS_RUNS: ${{ inputs.max_flakiness_runs }}
|
|
110
168
|
with:
|
|
111
169
|
prompt: |
|
|
112
170
|
The failing E2E platform test ran in workflow run ${{ github.run_id }} of this repo.
|
|
113
171
|
|
|
114
172
|
${{ inputs.investigate_prompt }}
|
|
173
|
+
|
|
174
|
+
${{ inputs.priority_prompt }}
|
|
115
175
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
116
176
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
117
|
-
plugin_marketplaces:
|
|
118
|
-
|
|
177
|
+
plugin_marketplaces: |
|
|
178
|
+
https://github.com/apify/apify-test-tools.git
|
|
179
|
+
${{ steps.agent-skills-internal.outcome == 'success' && format('{0}/.agent-skills-internal', github.workspace) || '' }}
|
|
180
|
+
plugins: |
|
|
181
|
+
platform-tests-investigate-and-fix@apify-test-tools
|
|
182
|
+
${{ steps.agent-skills-internal.outcome == 'success' && 'redash-analyst@apify-agent-skills-internal' || '' }}
|
|
119
183
|
# The `tools` query parameter below selects which tools the Apify MCP server
|
|
120
184
|
# exposes: reading an Actor run — its status, exit code, storage ids and log — and
|
|
121
185
|
# reading that run's dataset items and its key-value store keys and records, e.g.
|
|
122
186
|
# INPUT, OUTPUT and error snapshots. WARN: the server adds `abort-actor-run` on top
|
|
123
187
|
# even when not listed here, see https://github.com/apify/apify-mcp-server
|
|
188
|
+
# `--disallowedTools` removes the Redash MCP server's tools that change Redash: creating,
|
|
189
|
+
# editing, sharing or deleting queries, visualizations, dashboards, widgets, alerts and snippets.
|
|
124
190
|
claude_args: |
|
|
125
|
-
--mcp-config '{"mcpServers":{"apify":{"type":"http","url":"https://mcp.apify.com/?tools=get-actor-run,get-actor-run-log,get-dataset-list,get-dataset,get-dataset-items,get-key-value-store-list,get-key-value-store,get-key-value-store-keys,get-key-value-store-record","headers":{"Authorization":"Bearer ${TESTER_APIFY_TOKEN}"}}}}'
|
|
191
|
+
--mcp-config '{"mcpServers":{"apify":{"type":"http","url":"https://mcp.apify.com/?tools=get-actor-run,get-actor-run-log,get-dataset-list,get-dataset,get-dataset-items,get-key-value-store-list,get-key-value-store,get-key-value-store-keys,get-key-value-store-record","headers":{"Authorization":"Bearer ${TESTER_APIFY_TOKEN}"}},"redash":{"type":"stdio","command":"${{ runner.temp }}/redash-mcp/node_modules/.bin/redash-mcp","env":{"REDASH_URL":"https://charts.apify.com/","REDASH_API_KEY":"${REDASH_API_KEY}"}}}}'
|
|
192
|
+
--disallowedTools mcp__redash__create_query,mcp__redash__update_query,mcp__redash__update_query_parameters,mcp__redash__archive_query,mcp__redash__fork_query,mcp__redash__add_query_favorite,mcp__redash__remove_query_favorite,mcp__redash__create_visualization,mcp__redash__update_visualization,mcp__redash__update_chart_visualization,mcp__redash__delete_visualization,mcp__redash__create_dashboard,mcp__redash__update_dashboard,mcp__redash__update_dashboard_parameters,mcp__redash__archive_dashboard,mcp__redash__fork_dashboard,mcp__redash__share_dashboard,mcp__redash__unshare_dashboard,mcp__redash__add_dashboard_favorite,mcp__redash__remove_dashboard_favorite,mcp__redash__create_alert,mcp__redash__update_alert,mcp__redash__delete_alert,mcp__redash__mute_alert,mcp__redash__add_alert_subscription,mcp__redash__remove_alert_subscription,mcp__redash__create_widget,mcp__redash__update_widget,mcp__redash__update_widget_layout,mcp__redash__update_dashboard_layout,mcp__redash__update_widget_parameter_mappings,mcp__redash__delete_widget,mcp__redash__create_query_snippet,mcp__redash__update_query_snippet,mcp__redash__delete_query_snippet
|
|
126
193
|
--model ${{ inputs.model }}
|
|
127
194
|
${{ inputs.effort && format('--effort {0}', inputs.effort) || '' }}
|
|
128
195
|
--dangerously-skip-permissions
|
package/.prettierignore
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
CHANGELOG.md
|
|
2
|
-
|
|
2
|
+
.cli-test-*
|
|
3
3
|
# Operating instructions read by Claude, not prose for humans. Prettier collapses the nested bullet
|
|
4
4
|
# list under "do not visit, fetch, infer, or evaluate the following external links" into one run-on
|
|
5
5
|
# line, which changes what the model is told. Keeping it byte-identical also makes re-syncing it
|
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file.
|
|
|
15
15
|
- **ci:** Support pnpm ([#214](https://github.com/apify/apify-test-tools/pull/214)) ([ee7d734](https://github.com/apify/apify-test-tools/commit/ee7d7340564c5b8657a8a1f0cf920d67b40ae013)) by [@ruocco-l](https://github.com/ruocco-l)
|
|
16
16
|
- Support flexible secret passing methods in workflows ([#225](https://github.com/apify/apify-test-tools/pull/225)) ([22f7e80](https://github.com/apify/apify-test-tools/commit/22f7e807ca3949656c15b79f848a192d71b15946)) by [@metalwarrior665](https://github.com/metalwarrior665), closes [#205](https://github.com/apify/apify-test-tools/issues/205)
|
|
17
17
|
- [**breaking**] Require env vars of test versions in sync with the default version ([#217](https://github.com/apify/apify-test-tools/pull/217)) ([a2481dd](https://github.com/apify/apify-test-tools/commit/a2481ddf09004308cb54e49b783c8b21a25dcbe4)) by [@metalwarrior665](https://github.com/metalwarrior665)
|
|
18
|
+
- Add impact & priority assessment to claude investigator ([#216](https://github.com/apify/apify-test-tools/pull/216)) ([fd16622](https://github.com/apify/apify-test-tools/commit/fd16622b910ec6e9b5515ea0bd26b0a41c22bd23)) by [@foxt451](https://github.com/foxt451), closes [#208](https://github.com/apify/apify-test-tools/issues/208)
|
|
18
19
|
|
|
19
20
|
### 🐛 Bug Fixes
|
|
20
21
|
|
|
@@ -22,6 +23,7 @@ All notable changes to this project will be documented in this file.
|
|
|
22
23
|
- Build and test on test-only changes even when .dockerignore lists the tests ([#177](https://github.com/apify/apify-test-tools/pull/177)) ([5cb1b5a](https://github.com/apify/apify-test-tools/commit/5cb1b5ab5f6f43ec279f9624b402e73d55a5974a)) by [@artogahr](https://github.com/artogahr), closes [#145](https://github.com/apify/apify-test-tools/issues/145)
|
|
23
24
|
- **git:** List both paths of moved files when detecting changes ([#215](https://github.com/apify/apify-test-tools/pull/215)) ([44ba565](https://github.com/apify/apify-test-tools/commit/44ba565242c1ac3daea281a648acb28712bb4363)) by [@metalwarrior665](https://github.com/metalwarrior665)
|
|
24
25
|
- **workflows:** Load setup action and review prompt from the called commit ([#226](https://github.com/apify/apify-test-tools/pull/226)) ([7524711](https://github.com/apify/apify-test-tools/commit/752471135d4d147f6f6492a26c08af388d7ccf72)) by [@metalwarrior665](https://github.com/metalwarrior665)
|
|
26
|
+
- **test:** Clean up compiled CLI dir when build fails ([#224](https://github.com/apify/apify-test-tools/pull/224)) ([f9f2f5c](https://github.com/apify/apify-test-tools/commit/f9f2f5c64cfe936ee0b72a0fbe7408282c68fbac)) by [@JuanGalilea](https://github.com/JuanGalilea)
|
|
25
27
|
|
|
26
28
|
### 🚜 Refactor
|
|
27
29
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Compiles the CLI from the sources into a temporary directory, so tests run it the way users do. */
|
|
1
|
+
/** Compiles the CLI from the sources into a temporary directory, so tests run it the way npm users do. */
|
|
2
2
|
export declare const compileCli: () => Promise<{
|
|
3
3
|
cliPath: string;
|
|
4
4
|
cleanup: () => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiled-cli.d.ts","sourceRoot":"","sources":["../../../../test/unit/bin/compiled-cli.ts"],"names":[],"mappings":"AASA,
|
|
1
|
+
{"version":3,"file":"compiled-cli.d.ts","sourceRoot":"","sources":["../../../../test/unit/bin/compiled-cli.ts"],"names":[],"mappings":"AASA,0GAA0G;AAC1G,eAAO,MAAM,UAAU;;;EAYtB,CAAC"}
|
|
@@ -5,12 +5,19 @@ import process from 'node:process';
|
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
const projectRoot = fileURLToPath(new URL('../../../', import.meta.url));
|
|
7
7
|
const compilerPath = fileURLToPath(new URL('../../../node_modules/typescript/bin/tsc', import.meta.url));
|
|
8
|
-
/** Compiles the CLI from the sources into a temporary directory, so tests run it the way users do. */
|
|
8
|
+
/** Compiles the CLI from the sources into a temporary directory, so tests run it the way npm users do. */
|
|
9
9
|
export const compileCli = async () => {
|
|
10
10
|
const buildDir = await mkdtemp(path.join(projectRoot, '.cli-test-'));
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
const cleanup = async () => rm(buildDir, { recursive: true, force: true });
|
|
12
|
+
try {
|
|
13
|
+
execFileSync(process.execPath, [compilerPath, '--outDir', buildDir], { cwd: projectRoot });
|
|
14
|
+
const cliPath = path.join(buildDir, 'bin/main.js');
|
|
15
|
+
await chmod(cliPath, 0o755);
|
|
16
|
+
return { cliPath, cleanup };
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
await cleanup();
|
|
20
|
+
throw error;
|
|
21
|
+
}
|
|
15
22
|
};
|
|
16
23
|
//# sourceMappingURL=compiled-cli.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiled-cli.js","sourceRoot":"","sources":["../../../../test/un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W,EAAE,YAAY,CAAC,CAAC,CAAC;IACrE,MAAM,OAAO,GAAG,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3E,IAAI,CAAC;QACD,YAAY,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,CAAC;QAC3F,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;QACnD,MAAM,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC5B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAChC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,MAAM,OAAO,EAAE,CAAC;QAChB,MAAM,KAAK,CAAC;IAChB,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { spawnSync } from 'node:child_process';
|
|
2
2
|
import { chmod, mkdtemp, rm, writeFile } from 'node:fs/promises';
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import process from 'node:process';
|
|
6
|
-
import { fileURLToPath } from 'node:url';
|
|
7
6
|
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
|
|
8
|
-
|
|
9
|
-
const compilerPath = fileURLToPath(new URL('../../../node_modules/typescript/bin/tsc', import.meta.url));
|
|
7
|
+
import { compileCli } from './compiled-cli.js';
|
|
10
8
|
let cliPath;
|
|
11
|
-
let
|
|
9
|
+
let cleanup;
|
|
12
10
|
let gitStubDir;
|
|
13
11
|
const sha = '1'.repeat(40);
|
|
14
12
|
describe('CLI logging', () => {
|
|
15
13
|
beforeAll(async () => {
|
|
16
|
-
|
|
17
|
-
execFileSync(process.execPath, [compilerPath, '--outDir', buildDir], { cwd: projectRoot });
|
|
18
|
-
cliPath = path.join(buildDir, 'bin/main.js');
|
|
19
|
-
await chmod(cliPath, 0o755);
|
|
14
|
+
({ cliPath, cleanup } = await compileCli());
|
|
20
15
|
gitStubDir = await mkdtemp(path.join(os.tmpdir(), 'apify-cli-logging-'));
|
|
21
16
|
const gitStub = path.join(gitStubDir, 'git');
|
|
22
17
|
await writeFile(gitStub, `#!/bin/sh\nprintf '%s' '${sha}»¦«Test<test@example.com>»¦«Tue, 06 Oct 2026 00:00:00 +0000»¦«feature'\n`);
|
|
23
18
|
await chmod(gitStub, 0o755);
|
|
24
19
|
});
|
|
25
20
|
afterAll(async () => {
|
|
26
|
-
|
|
27
|
-
await rm(buildDir, { recursive: true, force: true });
|
|
21
|
+
await cleanup?.();
|
|
28
22
|
if (gitStubDir)
|
|
29
23
|
await rm(gitStubDir, { recursive: true, force: true });
|
|
30
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.test.js","sourceRoot":"","sources":["../../../../test/unit/bin/logging.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"logging.test.js","sourceRoot":"","sources":["../../../../test/unit/bin/logging.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,IAAI,OAAe,CAAC;AACpB,IAAI,O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