Skip to content

chore(ci): check rust formatting before restoring caches - #130478

Merged
trunk-io[bot] merged 1 commit into
masterfrom
posthog/ci-rust-format-before-cache
Nov 6, 2026
Merged

trunk-io[bot] merged 1 commit into
masterfrom
posthog/ci-rust-format-before-cache

Conversation

@posthog

@posthog posthog Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Problem

Rust contributors wait for dependency-cache setup before CI can report formatting errors.

Why: Formatting needs rustfmt, so cache setup delays feedback without helping the check.

Changes

  • Run the unchanged formatting check immediately after Rust installation. Formatting failures skip cache setup; passing runs keep every check.

Before:

flowchart LR
    A[Install Rust] --> B[Cache setup] --> C[Check format]
    classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff;
    class A,B,C phBlue;
Loading

After:

flowchart LR
    A[Install Rust] --> C[Check format] --> B[Cache setup]
    classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff;
    class A,B,C phBlue;
Loading

How did you test this code?

  • Workflow lint, actionlint, scenario planning, and structural comparison of all steps.
  • Post-merge: verify formatting failures skip both caches and passing runs reach clippy. Fleet savings remain unmeasured.

Test rationale: Only step order changes; no new test is needed. The Rust build was not run locally.

Release status

  • No feature flag controls this change

Docs update

  • None.

🤖 Agent context

Autonomy: Fully autonomous

Agent: Codex, GPT-6 (runtime model identifier unavailable)

Skills: /authoring-ci-workflows, /reducing-ci-costs, /verifying-changes, /running-ci-preflight, /writing-pr-descriptions

More context for AI agents
  • Session: Scout context. This change does not implement the cache-size experiment.
  • Decisions: Open-PR searches found no matching Rust formatting fix. Tasks search timed out.
  • Follow-ups: Compare formatting-failure exposure and complete-job durations after merge. No cash savings claimed.
  • Read closely: Formatting runs after rustfmt installation and before cache setup.

Created with PostHog Desktop

Generated-By: PostHog Desktop
Task-Id: a8daa0e4-ae3c-4adc-a365-3fe760f76c10
@trunk-io

trunk-io Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@posthog posthog Bot left a comment

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.

PostHog Review · Standard · reviewed bcd4676: no findings.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🤖 CI report

✅ Trunk lane — non-backend lane

This PR is assigned to the non-backend lane. It does not run backend Python tests and may merge in parallel with PRs in other lanes.

@posthog
posthog Bot marked this pull request as ready for review November 5, 2026 22:04
@parameterai

parameterai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Risk: No findings

The change moves the cargo fmt -- --check step in the CI Rust job from after cache setup to before it, so formatting failures are reported faster and skip cache work. No security-relevant surface is added or altered: the step runs in the same job, runner, permissions, and checkout as before, and touches no secrets, tokens, or attacker-controlled inputs.

Sentinel reviewed bcd4676 · Review settings

@posthog

posthog Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Robot: QA Swarm review complete.

Verdict: APPROVE (round 1 @ bcd4676)

No findings. The format check runs after Rust installation and before cache setup. Its prerequisites and command stay the same.

Key findings

None.

Convergence

No additional review was needed.

Reviewer summaries

Reviewer Assessment
Router (gpt-6-luna) Low risk. High confidence. No delegation.

Automated review by QA Swarm.

@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team November 5, 2026 22:05
@posthog posthog Bot added the stamphog Request AI approval (no full review) label Nov 5, 2026
@stamphog

stamphog Bot commented Nov 5, 2026

Copy link
Copy Markdown

stamphog does not review bot-authored pull requests, so the trigger label has been removed. This change needs a human reviewer.

@stamphog stamphog Bot removed the stamphog Request AI approval (no full review) label Nov 5, 2026
@posthog
posthog Bot marked this pull request as draft November 5, 2026 22:29
@gantoine
gantoine marked this pull request as ready for review November 6, 2026 14:39
@gantoine gantoine self-assigned this Nov 6, 2026
@stamphog
stamphog Bot requested a review from a team November 6, 2026 14:39
@trunk-io
trunk-io Bot merged commit 3572bbf into master Nov 6, 2026
452 of 456 checks passed
@trunk-io
trunk-io Bot deleted the posthog/ci-rust-format-before-cache branch November 6, 2026 15:01
@deployment-status-posthog

deployment-status-posthog Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-11-06 15:25 UTC Run
prod-us ✅ Deployed 2026-11-06 15:42 UTC Run
prod-eu ✅ Deployed 2026-11-06 15:37 UTC Run

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.

1 participant