-
Notifications
You must be signed in to change notification settings - Fork 626
Postgres #5365
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
Postgres #5365
Changes from 43 commits
de730f5
dccb36d
266841c
9d67565
04d4edd
bc7b72b
9ba57fc
5ad412a
db1434b
a083c25
ddf80df
3c7a23b
8b095f1
80dd7ab
d08f502
374b5d8
6a5b931
fea05a7
b67e2cd
54dc9b5
f0f45f9
f4ae5d8
9c9105d
ab875ef
c95c9b3
88e8e48
2eadf8e
9494c00
d3090df
5b3c675
fe2cc10
50897fd
3c29e2a
1370762
4b1716e
2fc2224
c260229
7408e4b
f0bfb0e
1f1e6b3
c198a01
14dffe3
7e60e35
bef7978
8cb3c5a
ec9ec17
0283d85
3a8901d
061136a
9c91f9f
4e11aad
615399f
f492eb4
c7afe8d
7aa5fd1
cfdd3c6
a9338c4
c863da6
6971100
3885742
8bc9d3f
9af8358
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,3 +42,6 @@ test/public/uploads | |
|
|
||
| # vim swp files | ||
| .*.sw* | ||
|
|
||
| # claude-tools log files | ||
| claude-tools/**/*.log | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. claude-tools is meant to persist, but its logs are not |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| // Require this before running mocha to detect what activates process.stdin | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. claude-tools is just utilities claude code uses to test things without a lot of duplicate effort. Not intended for the use of others, but belongs in the repo, again to avoid duplicate effort. |
||
| // Usage: npx mocha -t 10000 --require ./claude-tools/detect-handles.js test/assets.js | ||
|
|
||
| console.log(`stdin paused at startup: ${process.stdin.isPaused()}`); | ||
| console.log(`stdin readableFlowing at startup: ${process.stdin.readableFlowing}`); | ||
|
|
||
| // Monkey-patch stdin.resume to capture the call stack | ||
| const origResume = process.stdin.resume.bind(process.stdin); | ||
| process.stdin.resume = function(...args) { | ||
| console.log('\n=== process.stdin.resume() called ==='); | ||
| console.log(new Error().stack); | ||
| return origResume(...args); | ||
| }; | ||
|
|
||
| // Monkey-patch stdin.on to detect 'data' listener additions | ||
| const origOn = process.stdin.on.bind(process.stdin); | ||
| process.stdin.on = function(event, ...args) { | ||
| if (event === 'data' || event === 'readable') { | ||
| console.log(`\n=== process.stdin.on('${event}') called ===`); | ||
| console.log(new Error().stack); | ||
| } | ||
| return origOn(event, ...args); | ||
| }; | ||
|
|
||
| // Periodically check stdin state changes | ||
| let lastState = process.stdin.readableFlowing; | ||
| const checker = setInterval(() => { | ||
| if (process.stdin.readableFlowing !== lastState) { | ||
| console.log(`\n=== stdin readableFlowing changed: ${lastState} -> ${process.stdin.readableFlowing} ===`); | ||
| console.log(new Error().stack); | ||
| lastState = process.stdin.readableFlowing; | ||
| } | ||
| }, 100); | ||
| checker.unref(); | ||
|
|
||
| const origRun = require('mocha/lib/runner').prototype.run; | ||
| require('mocha/lib/runner').prototype.run = function(fn) { | ||
| return origRun.call(this, function(failures) { | ||
| console.log(`\nstdin paused at end: ${process.stdin.isPaused()}`); | ||
| console.log(`stdin readableFlowing at end: ${process.stdin.readableFlowing}`); | ||
| setTimeout(() => { | ||
| process.exit(failures ? 3 : 0); | ||
| }, 2000); | ||
| if (fn) fn(failures); | ||
| }); | ||
| }; | ||
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 should be probably
pnpminsteadnpm.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.
Fixed that.