Skip to content

ci: optimize claude failing platform tests investigation workflow - #249

Open
Patai5 wants to merge 4 commits into
masterfrom
ci/optimize-claude-investigation-workflow
Open

Patai5 wants to merge 4 commits into
masterfrom
ci/optimize-claude-investigation-workflow

Conversation

@Patai5

@Patai5 Patai5 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Discussed on slack:
https://apify.slack.com/archives/C0AMFHY27FB/p1794319738563179


Turns out that the file changed so much that git doesn't even think it's the same one anymore (I renamed it) 😭 It is a lot of changes and mostly clauded so let me know if anything looks wrong to you :P

Changes:

  • Duplicate check: A cheap deduplication agent runs first, which will make sure the issue gets deduplicated from the already opened GH issues.
  • The recurring issues will now be nicely and deterministically reported in a recurring comment that will get edited each time and updated with the new failures.
  • Renamed public_platform-tests-claude-investigate-and-fix.yaml => public_platform-tests-claude-investigate.yaml.

It's a breaking change. Both the workflow is renamed and the NPM_TOKEN removal is a breaking change.

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}"}}}}'
run: |
echo '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}"}}}}' >> "$GITHUB_OUTPUT"
echo "config=$MCP_CONFIG" >> "$GITHUB_OUTPUT"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

wait, doesn't this leak keys 👀

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, so github only substitutes in it's own syntax with double brakcets like ${{ ... }}, so this is fine. All of the tokens inside the MCP_CONFIG are never substituted 👍

@foxt451 foxt451 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

cool. I like the aggregated comment and using a model to dedupe, but I have a question whether the root cause identification should be on a stronger model

# Reads the cheap model's answer:
#
# 1. Everything covered: skip the investigation.
# 2. Part covered: tell the main model which part, so it investigates only the rest.

@foxt451 foxt451 Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it'd be better to start investigation first and then dedupe. Yes, it might cost some more, but to properly identify root cause requires to do a proper investigation: go into snapshots, check logs, go through all issues, look into the code etc. And by delegating this to a cheap model you risk it not identifying root cause properly and a wrong dedupe I think. And if it does identify the root cause properly, there'll be duplicate work because the next step will have to identify it from scratch (dedupe.json doesn't seem to record root cause). wdyt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree there is a risk to it, but investigating first would ruin the point of this PR. If we let the strong model investigate first, then all of our cost improvements would be worthless.

And by delegating this to a cheap model you risk it not identifying root cause properly and a wrong dedupe I think.

I updated it now to sonnet now. That should be pretty capable to correctly dedupe the issues without delving too deep.

And if it does identify the root cause properly, there'll be duplicate work because the next step will have to identify it from scratch (dedupe.json doesn't seem to record root cause). wdyt?

That's on purpose though, to not pollute the strong model with incorrect assumptions. Like this, it will start over and get its own findings. And the extra work should be pretty quick. The cheap model shouldn't be delving too deep into the details, while the main one has the ability to retry, inspect redash (well, it used to before the security fixes).

✅ 1461591

@metalwarrior665 metalwarrior665 mentioned this pull request Nov 12, 2026
4 tasks done
…investigation-workflow

# Conflicts:
#	.github/workflows/public_platform-tests-claude-investigate-and-fix.yaml
@Patai5
Patai5 requested a review from foxt451 November 28, 2026 05:57

This branch has not been deployed

No deployments
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