-
-
Notifications
You must be signed in to change notification settings - Fork 159
fix(ci): restore the lint gate on main #8093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| ### Fixed | ||
|
|
||
| - Restore the `lint` gate on `main`. Three of its steps were failing on a pristine checkout, so the required context could not distinguish a good pull request from a bad one and every merge went through admin bypass (#8092, #8093). | ||
| - `crates/perry-runtime/src/timer.rs` had reached 2010 lines against the 2000-line cap. Its `#[cfg(test)]` scanner seeding/snapshot helpers move to `timer/test_scanner_support.rs`, re-exported by name (a glob would not propagate to the `crate::timer::…` call sites in the GC root-scanner tests). `timer.rs` is now 1866 lines. | ||
| - `crates/perry-codegen/src/expr/property_set.rs` had a `GC_STORE_AUDIT(POINTER_FREE)` marker for its guarded raw-f64 class-field store, but a multi-line `canonicalize_raw_f64_numeric_store_value` call had pushed the marker 8 lines above the store — outside the inventory's ±6-line window. The marker moves to sit against the store it describes. No change to what is stored or barriered. | ||
| - `object/spill.rs` (5 bare reads against a ceiling of 3) and `json_tape.rs` (22 against 21) exceeded their raw-handle ceilings. Three reads convert to `RuntimeHandle::across_mut`, which is the conversion `raw_handle_debt_files.txt` asks for rather than a raised ceiling: in `spill.rs` across `object_meta_ensure` and `js_array_alloc_with_length_exact`, and in `json_tape.rs` across the `LazyArrayRooted` safepoint. Each already reloaded the pointer afterwards, so this is the same discipline expressed in the form the ratchet can count; the combinator additionally makes the pre-call address unnameable. | ||
|
|
||
| The raw-handle baseline drops 998 → 993. `--update` also tightened three ceilings that were carrying pre-existing slack (`object_ops/define_property.rs` 3→2, `reflect_support.rs` 4→3, `string/split.rs` 10→7); none of those files is touched by an open pull request. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,151 @@ | ||
| //! Test-only seeding and snapshot helpers for the timer root scanners. | ||
| //! | ||
| //! Split out of `timer.rs` to keep that file under the 2000-line cap | ||
| //! (`scripts/check_file_size.sh`). These are `#[cfg(test)]` support routines | ||
| //! reached as `crate::timer::<name>` from the GC root-scanner tests; the | ||
| //! parent re-exports each one by name. | ||
|
|
||
| use super::*; | ||
|
|
||
| const TEST_CALLBACK_TIMER_ID: i64 = i64::MIN + 101; | ||
| const TEST_INTERVAL_TIMER_ID: i64 = i64::MIN + 102; | ||
|
|
||
| #[derive(Debug, Default)] | ||
| pub(crate) struct TestTimerScannerSnapshot { | ||
| pub timeout_promise_ptr: usize, | ||
| pub timeout_value_bits: u64, | ||
| pub callback_ptr: usize, | ||
| pub callback_arg_bits: u64, | ||
| pub callback_context_store_bits: u64, | ||
| pub interval_callback_ptr: usize, | ||
| pub interval_context_store_bits: u64, | ||
| } | ||
|
|
||
| pub(crate) fn test_seed_timer_scanner_roots( | ||
| promise: *mut Promise, | ||
| value: f64, | ||
| callback: i64, | ||
| arg: f64, | ||
| context_store: f64, | ||
| ) { | ||
| let context = crate::async_context::test_snapshot_with_store(context_store); | ||
| let deadline = Instant::now() + Duration::from_secs(86_400); | ||
| TIMER_QUEUE.lock().unwrap().push(Timer { | ||
| // #6185: test scaffolding runs on the primary agent. | ||
| owner: crate::agent::current_agent(), | ||
| deadline, | ||
| promise, | ||
| value, | ||
| has_ref: true, | ||
| }); | ||
| CALLBACK_TIMERS.lock().unwrap().push(CallbackTimer { | ||
| // #6185: test scaffolding runs on the primary agent. | ||
| owner: crate::agent::current_agent(), | ||
| id: TEST_CALLBACK_TIMER_ID, | ||
| kind: CallbackTimerKind::Timeout, | ||
| deadline, | ||
| delay_ms: 86_400_000, | ||
| callback, | ||
| args: vec![arg], | ||
| context: context.clone(), | ||
| async_id: 0, | ||
| trigger_async_id: 0, | ||
| cleared: false, | ||
| }); | ||
| INTERVAL_TIMERS.lock().unwrap().push(IntervalTimer { | ||
| // #6185: test scaffolding runs on the primary agent. | ||
| owner: crate::agent::current_agent(), | ||
| id: TEST_INTERVAL_TIMER_ID, | ||
| callback, | ||
| interval_ms: 86_400_000, | ||
| next_deadline: deadline, | ||
| args: Vec::new(), | ||
| context, | ||
| cleared: false, | ||
| }); | ||
| } | ||
|
|
||
| pub(crate) fn test_seed_many_timeout_roots(values: &[f64]) { | ||
| let deadline = Instant::now() + Duration::from_secs(86_400); | ||
| let mut q = TIMER_QUEUE.lock().unwrap(); | ||
| q.clear(); | ||
| for &value in values { | ||
| q.push(Timer { | ||
| // #6185: test scaffolding runs on the primary agent. | ||
| owner: crate::agent::current_agent(), | ||
| deadline, | ||
| promise: std::ptr::null_mut(), | ||
| value, | ||
| has_ref: true, | ||
| }); | ||
| } | ||
| } | ||
|
|
||
| pub(crate) fn test_clear_all_timer_scanner_roots() { | ||
| TIMER_QUEUE.lock().unwrap().clear(); | ||
| CALLBACK_TIMERS.lock().unwrap().clear(); | ||
| INTERVAL_TIMERS.lock().unwrap().clear(); | ||
| } | ||
|
|
||
| pub(crate) fn test_timer_scanner_snapshot() -> TestTimerScannerSnapshot { | ||
| let mut snapshot = TestTimerScannerSnapshot::default(); | ||
| if let Some(timer) = TIMER_QUEUE.lock().unwrap().last() { | ||
| snapshot.timeout_promise_ptr = timer.promise as usize; | ||
| snapshot.timeout_value_bits = timer.value.to_bits(); | ||
| } | ||
| if let Some(timer) = CALLBACK_TIMERS | ||
| .lock() | ||
| .unwrap() | ||
| .iter() | ||
| .find(|timer| timer.id == TEST_CALLBACK_TIMER_ID) | ||
| { | ||
| snapshot.callback_ptr = timer.callback as usize; | ||
| snapshot.callback_arg_bits = timer.args.first().copied().map(f64::to_bits).unwrap_or(0); | ||
| snapshot.callback_context_store_bits = | ||
| crate::async_context::test_snapshot_first_store(&timer.context) | ||
| .map(f64::to_bits) | ||
| .unwrap_or(0); | ||
| } | ||
| if let Some(timer) = INTERVAL_TIMERS | ||
| .lock() | ||
| .unwrap() | ||
| .iter() | ||
| .find(|timer| timer.id == TEST_INTERVAL_TIMER_ID) | ||
| { | ||
| snapshot.interval_callback_ptr = timer.callback as usize; | ||
| snapshot.interval_context_store_bits = | ||
| crate::async_context::test_snapshot_first_store(&timer.context) | ||
| .map(f64::to_bits) | ||
| .unwrap_or(0); | ||
| } | ||
| snapshot | ||
| } | ||
|
|
||
| pub(crate) fn test_callback_timer_snapshot(timer_id: i64) -> Option<(usize, u64)> { | ||
| CALLBACK_TIMERS | ||
| .lock() | ||
| .unwrap() | ||
| .iter() | ||
| .find(|timer| timer.id == timer_id) | ||
| .map(|timer| { | ||
| ( | ||
| timer.callback as usize, | ||
| timer.args.first().copied().map(f64::to_bits).unwrap_or(0), | ||
| ) | ||
| }) | ||
| } | ||
|
|
||
| pub(crate) fn test_clear_timer_scanner_roots(promise_before: usize, promise_after: usize) { | ||
| TIMER_QUEUE.lock().unwrap().retain(|timer| { | ||
| let promise = timer.promise as usize; | ||
| promise != promise_before && promise != promise_after | ||
| }); | ||
| CALLBACK_TIMERS | ||
| .lock() | ||
| .unwrap() | ||
| .retain(|timer| timer.id != TEST_CALLBACK_TIMER_ID); | ||
| INTERVAL_TIMERS | ||
| .lock() | ||
| .unwrap() | ||
| .retain(|timer| timer.id != TEST_INTERVAL_TIMER_ID); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 998 | ||
| 993 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add validation notes to the changeset.
The fragment explains the root cause and affected paths, but it does not include the successful lint checks, compilation, and runtime-test results stated for this PR. Add a short validation sentence so the fragment is complete when release notes are assembled.
Based on learnings, Perry changelog fragments under
changelog.d/should include validation notes.🤖 Prompt for AI Agents
Source: Learnings