Skip to content

fix(sv)!: enforce class member access visibility - #2074

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/sv-tests-preprocessing/enforce-class-member-access-visibility--8d06c543
Oct 25, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/sv-tests-preprocessing/enforce-class-member-access-visibility--8d06c543

Conversation

@tignear

@tignear tignear commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Reject local and protected property and method access from unauthorized
lexical class scopes, including static members and constructors. Preserve
same-class access through another instance, inherited base methods, and
protected access from derived classes (IEEE 1800-2023 8.18).

Use a dedicated InaccessibleClassMember diagnostic and share the access
check with randomization. Update the five affected negative sv-tests cases
in both state modes; CI verifies the full release-driver corpus.

Validation: analyzer unit tests (812 passed, 3 existing ignored), combined
analyzer tests (814 passed, 3 ignored), focused positive/negative access
regressions, Clippy and formatting. Full release sv-tests runs in CI as
requested. Class backend integration is deferred to CI; the local optimized
executor build was stopped before running cases.

BREAKING CHANGE: AnalyzerError gains InaccessibleClassMember; exhaustive
Rust matches must handle the new diagnostic.

Depends-On: #2067

Reject local and protected property and method access from unauthorized
lexical class scopes, including static members and constructors. Preserve
same-class access through another instance, inherited base methods, and
protected access from derived classes (IEEE 1800-2023 8.18).

Use a dedicated InaccessibleClassMember diagnostic and share the access
check with randomization. Update the five affected negative sv-tests cases
in both state modes; CI verifies the full release-driver corpus.

Validation: analyzer unit tests (812 passed, 3 existing ignored), combined
analyzer tests (814 passed, 3 ignored), focused positive/negative access
regressions, Clippy and formatting. Full release sv-tests runs in CI as
requested. Class backend integration is deferred to CI; the local optimized
executor build was stopped before running cases.

BREAKING CHANGE: AnalyzerError gains InaccessibleClassMember; exhaustive
Rust matches must handle the new diagnostic.

Change-Id: I8d06c5438d529abac8c32c9ce7eec9cdd36764a9
@tignear

tignear commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 fix(sv)!: enforce class member access visibility #2074 👈
2 fix(sv): validate enum initializer declarations #2075
3 fix(sv)!: read heap strings in formatted scans #2076

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 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 ✅ Completed 2026-10-25T20:19:09.307021Z e5836ab PR opened
ℹ️ 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 25, 2026

@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: e5836ab740

ℹ️ 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 on lines +155 to +158
check_access(
tree,
dimensions,
&property.owner,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve class scope when checking static property initializers

When a static property initializer accesses a local or protected member of its own class, this check rejects valid code. For example, class C; local static int secret = 1; static int value = C::secret; endclass now produces InaccessibleClassMember. In procedural.rs, initial_processes_from_scope collects static property initializers and binds them using module-level item_dimensions, without setting class_scope, so the new guard treats this same-class access as external. Preserve each initializer's owning class and bind it in that lexical scope before enforcing visibility.

Useful? React with 👍 / 👎.

@mergify mergify Bot added the queued Mergify queue entry label Oct 25, 2026
@mergify

mergify Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 33 minutes 39 seconds in the queue, including 32 minutes 3 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • depends-on = celox-sim/celox#2067 [⛓️ fix(sv-tests): match the dashboard main-test corpus #2067]
  • 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-tests-preprocessing/match-dashboard-main-test-corpus--4942b1f1 to master October 25, 2026 20:43
@mergify
mergify Bot merged commit e984aaf into master Oct 25, 2026
24 checks passed
@mergify
mergify Bot deleted the stack/tignear/fix/sv-tests-preprocessing/enforce-class-member-access-visibility--8d06c543 branch October 25, 2026 21:16
@mergify mergify Bot removed the queued Mergify queue entry label Oct 25, 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