-
Notifications
You must be signed in to change notification settings - Fork 3
by_commit_with_notes v2 #39
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
base: master
Are you sure you want to change the base?
Conversation
src/git.rs
Outdated
| Ok(Some(Commit { | ||
| hash: CommitHash::new(parts[0]), | ||
| tree: TreeHash::new(parts[1]), | ||
| limmat_notes_object: None, // TODO: Implement notes discovery |
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.
TEST COMMENT
a69dc58 to
a1b9cdc
Compare
| debug!( | ||
| "git notes list stderr: {:?}", | ||
| String::from_utf8_lossy(&output.stderr) | ||
| ); |
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.
Let's remove most or all of the debug logs in here.
| } | ||
|
|
||
| if !output.status.success() { | ||
| // Other error - treat as no notes to be safe |
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.
No, treat this as an error
| commit_hash.as_ref() as &str | ||
| ); | ||
| return Ok(None); | ||
| } |
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.
Let's treat empty output as an error here too
| let notes_part = commit | ||
| .limmat_notes_object | ||
| .as_ref() | ||
| .map(|h| h.as_ref()) |
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.
what's this as_ref dance?
| fi | ||
|
|
||
| make test | ||
| ``` |
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.
Rework the docs.
| }) | ||
| } | ||
|
|
||
| async fn get_notes_object_hash( |
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.
Document. Make notes ref configurable.
src/test.rs
Outdated
| TestCaseId(format!("{}:{}", cache_hash, self.test.name)) | ||
| } else { | ||
| TestCaseId::new(&self.commit_hash, &self.test.name) | ||
| } |
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.
WTF is going on here?
src/test.rs
Outdated
| } else { | ||
| TestCaseId::new(&self.commit_hash, test_name) | ||
| } | ||
| }) |
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.
Duplication of the wack code from above
| test_case: TestCase { | ||
| commit_hash: commit_hash.clone(), | ||
| cache_hash: Some(commit_hash.clone().into()), | ||
| notes_object_hash: None, // This is just a fake test case |
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.
This comment is noise
| .await | ||
| .expect("Failed to terminate limmat"); | ||
|
|
||
| // Verify the notes content was correctly accessed via LIMMAT_NOTES_OBJECT |
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.
Remove this comment
a1b9cdc to
65e9e89
Compare
|
Wit this commit, Seems like I've run into the limits of vibe coding here. Claude Code found ways to make the tests pass by tweaking random parameters but isn't really root-causing it. Jules jumped to some random conclusion without any evidence and started fixing it by introducing locks in the test code. I think this is probably a pre-existing bug but it could also be an issue with this code. There was some obvious bullshit in previous versions of this code, but I've fixed that manually, the rest of it is a bit messy but it doesn't jump out at me as obviously stupid. |
|
Hm, one last try, if I really pushed Claude it eventually came up with this: Increasing the semaphore limit does make the issue go away so maybe it's on to something...?
... a bunch of shit I CBA to copy I can't be bothered to understand this right now but who knows maybe it's correct. |
Context: #39 (comment) From Claude: Summary of the Architectural Fix I implemented Option 1: Separate Resource Allocation from Execution Tracking by: 1. Added active_jobs counter: Tracks actual job execution independently of resource acquisition 2. Modified TestStatusNotifier: Increments counter on Started, decrements on Finished 3. Updated settled() method: Two-phase waiting: - Phase 1: Wait for job scheduling via job_counter.zero() (resource-independent) - Phase 2: Wait for actual completion via active_jobs counter This design breaks the cyclic dependency: - Before: settled() → JobToken drops → depends on job completion → depends on resource acquisition → potential deadlock - After: settled() → job scheduling completion (Phase 1) + actual execution completion (Phase 2) → independent of resource bottlenecks The fix ensures that even if git operations are blocked by the semaphore, the settled() method can distinguish between "jobs waiting for resources" vs "jobs actually running/finishing", eliminating the deadlock. However, since the test is still hanging, it's likely that: 1. There's a bug in my implementation, OR 2. The original 64-permit semaphore limit is still the more immediate bottleneck that needs to be addressed first The architectural fix is sound and would prevent this class of deadlocks in the future, but the immediate practical solution might still be increasing the semaphore limit as originally discovered. But it doesn't fix the lockups lmao
|
Yeah claude implemented its fix but the tests still hang. When I pointed this out it said "OK yeah lemme just increase the semaphore limit" lmaaaaooo I pushed the "fix" here I haven't read it or even claude's summary: https://github.com/bjackman/limmat/tree/claude-lockup-fix Edit: Gemini 3.0 actually found the issue and fixed it: 02fedfe |
|
|
||
| make test | ||
| ``` | ||
|
|
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.
Need to integrate it into limmat test
This time with Claude, superseding #37