Skip to content

chore(lint): prohibit thread-local state outside unit tests - #1533

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/sv-conformance-gaps/prohibit-thread-local-state-outside-unit-tests--7d46d5ed
Oct 19, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/sv-conformance-gaps/prohibit-thread-local-state-outside-unit-tests--7d46d5ed

Conversation

@tignear

@tignear tignear commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Disallow std::thread_local in the workspace Clippy configuration and in the
verifier crates that override it. The existing deny-level disallowed_macros lint
makes production reintroduction a build failure.

Permit instrumentation only in cfg(test) library builds. Clippy reports this
item macro at crate scope, so per-item/module allowances are ineffective;
normal library/example targets keep the prohibition. Remove production CLI macro allowances and write diagnostics through stderr
writers, keeping the prohibition active throughout benchmark entry points.
Full CI lints every workspace crate rather than a fixed package list. Generated conformance
capture code is test harness code and is outside the product workspace.

Validation: the affected crates pass all-target Clippy with the prohibition.
A temporary non-test example containing thread_local was rejected by
clippy::disallowed_macros, then removed. Formatting and config parsing pass.

Review validation: full workspace all-target Clippy with the CI feature set
passes without warnings; all 14 CI workflow tests and formatting pass.

Depends-On: #1559

@tignear

tignear commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 fix(lydite): execute derived clock events in proof conformance #1559
2 chore(lint): prohibit thread-local state outside unit tests #1533 👈

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-19T15:41:52.281567Z 643ba1e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 19, 2026
@tignear
tignear force-pushed the stack/tignear/fix/sv-conformance-gaps/own-runtime-state-explicit-vpi-session--64b5892d branch from 5678bad to 9f55e70 Compare October 19, 2026 06:42
@tignear
tignear force-pushed the stack/tignear/fix/sv-conformance-gaps/prohibit-thread-local-state-outside-unit-tests--7d46d5ed branch from ab0ad03 to 05325cd Compare October 19, 2026 06:42
@tignear

tignear commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial ab0ad03 2026-10-19 06:42 UTC
2 rebase ab0ad03 → 05325cd (rebase only) Replay unchanged lint policy after the required collector API review fix in #1531. 2026-10-19 06:42 UTC
3 rebase 05325cd → 43f5232 (rebase only) Replay unchanged descendant after the CI catalogue assertion fix in #1525. 2026-10-19 07:08 UTC
4 rebase 43f5232 → 4b98355 (rebase only) Replay unchanged descendant after the package call-site identity fix in #1526. 2026-10-19 07:35 UTC
5 content 4b98355 → 7fa455a Fix review r4311403113 and r4311403119: remove broad macro allowances and lint every workspace crate. 2026-10-19 08:34 UTC
6 content 7fa455a → 643ba1e 2026-10-19 15:41 UTC

@tignear
tignear force-pushed the stack/tignear/fix/sv-conformance-gaps/prohibit-thread-local-state-outside-unit-tests--7d46d5ed branch from 05325cd to 43f5232 Compare October 19, 2026 07:08
@tignear
tignear force-pushed the stack/tignear/fix/sv-conformance-gaps/own-runtime-state-explicit-vpi-session--64b5892d branch 2 times, most recently from f99483e to c6c1fcf Compare October 19, 2026 07:35
@tignear
tignear force-pushed the stack/tignear/fix/sv-conformance-gaps/prohibit-thread-local-state-outside-unit-tests--7d46d5ed branch from 43f5232 to 4b98355 Compare October 19, 2026 07:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b98355585

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread clippy.toml Resolved
@tignear
tignear force-pushed the stack/tignear/fix/sv-conformance-gaps/prohibit-thread-local-state-outside-unit-tests--7d46d5ed branch from 4b98355 to 7fa455a Compare October 19, 2026 08:35
@tignear
tignear force-pushed the stack/tignear/fix/sv-conformance-gaps/own-runtime-state-explicit-vpi-session--64b5892d branch from c6c1fcf to 4a0c90a Compare October 19, 2026 08:35
@mergify mergify Bot added the queued Mergify queue entry label Oct 19, 2026
@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 3 hours 33 minutes 47 seconds in the queue, including 4 hours 29 seconds running CI.

Reason

The merge conditions cannot be satisfied due to failing checks

  • Conventional Commit title
  • Conventional Commit title

Failing checks:

Hint

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

Base automatically changed from stack/tignear/fix/sv-conformance-gaps/own-runtime-state-explicit-vpi-session--64b5892d to master October 19, 2026 13:53
@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 19, 2026
Disallow std::thread_local in the workspace Clippy configuration and in the
verifier crates that override it. The existing deny-level disallowed_macros lint
makes production reintroduction a build failure.

Permit instrumentation only in cfg(test) library builds. Clippy reports this
item macro at crate scope, so per-item/module allowances are ineffective;
normal library/example targets keep the prohibition. Remove production CLI macro allowances and write diagnostics through stderr
writers, keeping the prohibition active throughout benchmark entry points.
Full CI lints every workspace crate rather than a fixed package list. Generated conformance
capture code is test harness code and is outside the product workspace.

Validation: the affected crates pass all-target Clippy with the prohibition.
A temporary non-test example containing thread_local was rejected by
clippy::disallowed_macros, then removed. Formatting and config parsing pass.

Review validation: full workspace all-target Clippy with the CI feature set
passes without warnings; all 14 CI workflow tests and formatting pass.

Change-Id: I7d46d5ede1bdc41ea58b7a58c7eb0ced81e5a1de
@tignear
tignear force-pushed the stack/tignear/fix/sv-conformance-gaps/prohibit-thread-local-state-outside-unit-tests--7d46d5ed branch from 7fa455a to 643ba1e Compare October 19, 2026 15:41
@tignear
tignear changed the base branch from master to stack/tignear/fix/sv-conformance-gaps/execute-derived-clock-events-proof-conformance--c2e84d62 October 19, 2026 15:41
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@mergify mergify Bot removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 19, 2026
@tignear tignear added merge-ready Request merging through Mergify after required checks and removed merge-ready Request merging through Mergify after required checks labels Oct 19, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 19, 2026
@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 25 minutes 59 seconds in the queue, including 49 minutes 49 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • depends-on = celox-sim/celox#1559 [⛓️ fix(lydite): execute derived clock events in proof conformance #1559]
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Windows)
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Windows)
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

Base automatically changed from stack/tignear/fix/sv-conformance-gaps/execute-derived-clock-events-proof-conformance--c2e84d62 to master October 19, 2026 18:01
@mergify
mergify Bot merged commit 26e6a5a into master Oct 19, 2026
32 checks passed
@mergify
mergify Bot deleted the stack/tignear/fix/sv-conformance-gaps/prohibit-thread-local-state-outside-unit-tests--7d46d5ed branch October 19, 2026 18:02
@mergify mergify Bot removed the queued Mergify queue entry label Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant