github source: rearm comment cites a stderr mirror the plugin logger never opts into, Only-ever-shortens wrong again on the throwing-tick path, one warn-less capturing fixture (#2126 residuals)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
- 領域
- backend, testing-qa
調査の方向性
Read hypaware-core/plugins-workspace/github/src/source.js around lines 138–161 and 203, plus test/plugins/github-source.test.js around lines 80–90. Update the two comments to limit the seenImports claim to ticks that return and remove the unsupported stderr-mirror explanation; preserve the schedule-before-log order. Add ...silentLog to the capturing fixture, then run the focused test and the stated test and typecheck commands.
索引モデルが issue の本文から書いたものです。
説明
Deferred from PR #2126, review round 2, head f739509a3bc0132a81b1f7f33e94ccc708476c91. Both review rounds for that PR are spent (cap N=2), so these land here instead of in-PR. Three residuals: one evidenced test defect (N3) and two comment-accuracy defects (N1, N2) in the same two files. All three were measured in round 2 and independently re-verified at triage; none blocks #2126, whose fix for #1789 was reproduced before and after in both rounds.
The common thread worth naming: N1 and N2 are comments that assert something untrue about why the code is shaped as it is, and N2 is the second correction of the same paragraph (round 1's F5 was the first). A comment that misattributes why a guard exists is what leads the next editor to remove the guard, so these are not typo-grade even though they are prose.
N1 - the rearm-before-log comment cites a throw source that does not exist at this call site
hypaware-core/plugins-workspace/github/src/source.js:158-161:
// Re-arm before logging: between the clearTimeout above and this call the
// source has no timer at all, and the stderr mirror behind `log.info` may
// throw (LLP 0329#stderr-mirror), which from a watch callback would leave
// the source permanently dead while status() reports the cancelled timer.
There is no stderr mirror behind this log.info. The chain, verified statically and dynamically at triage:
source.jsholds the runtime set atgithub/src/index.jswithlog: ctx.log.ctx.logcomes fromcreatePluginLogger(src/core/runtime/activation.js:1575), which callsgetLogger('plugin')with no opts.src/core/observability/logger.js:159:const mirror = opts.mirrorStderr ?? false, so theprocess.stderr.writemirror branch is dead for every plugin log, and the OTEL emit is wrapped intry/catchrouting toreportTelemetryFailure.- The
mirrorStderr: trueopt-in set (grep -rn mirrorStderr src/) is exactly the containment-refusal sites (capture_spool,dep_graph,cache/spool,cache/partition,cache/sweep_guard,config/grep_migration,plugin_doctor/dry_run,registry/commands). No plugin logger is in it.
Measured (stderr replaced with a thrower): getLogger('plugin').info(...) does not throw (plainThrew: null); getLogger('plugin', { mirrorStderr: true }).info(...) throws EPIPE: stderr gone. LLP 0329#stderr-mirror is the decision that refusal reports opt in per call site; it does not support the use this comment makes of it, and because the citation is prose rather than an @ref, /ref-check will not catch it.
The reorder itself is correct and must stay. It is right on the src/core/daemon/control.js:322-331 precedent (a watch-callback body must not be able to throw between disarm and re-arm) and it is free. Only the stated mechanism is wrong. Suggested wording from round 2: "Re-arm before logging: the source has no timer between the clearTimeout above and this call, and a throw from the log (a foreign global LoggerProvider, a fields bag with a throwing getter) must not be able to land in that gap." Optional nit while there: hoist const delayMs = nextDelayMs() above the clearTimeout so the window the comment describes is literally empty.
N2 - the Only ever shortens paragraph is wrong for the second time, now on the throwing-tick path
source.js:138-145 (as reworded by the round 1 triage) now credits the seenImports snapshot, "already consumed by the tick's own end-of-tick read of the same write", with keeping the source off its own output. That holds only when the tick returns:
backlogPending = stagedImportPending() || result.pendingsits insidetick()'stry(source.js:57); thecatchat:77never callsstagedImportPending(), so a throwing tick refreshes nothing andseenImportsstays stale (empty from boot after a restart).runCaptureTickpersists cursors before rethrowing (tick.js:187-192), so a throwing tick still writes the sidecar this watcher watches.- Round 2 measured the consequence: with a standing authorization and a first throwing tick, one forced late event from the source's own closing write re-armed and latched
backlog_pendingwith no external writer at all (armed 1799996ms -> 900000ms, rearms=1). Under natural inotify delivery it did not occur in 0/15 trials, because the events landed whileinFlightwas still set; that is a delivery-timing accident, not the invariant the prose claims (round 1 measured 3 of 287 real events arriving after the reschedule).
Smallest honest wording: seenImports stops the self-re-arm on a tick that returns; a tick that throws leaves the snapshot stale, with the behavioral consequence owned by #2127. Doc-only; the code change belongs to #2127, not here.
N3 - one warn-less capturing logger fixture drives a live source (evidenced test defect)
Round 1's F3 converted five warn-less inline fixtures to silentLog but missed the capturing logger at test/plugins/github-source.test.js:80-90, which supplies only info/error and drives a live startGithubSource() at :99. watchSidecar's failure path calls runtime.log.warn('github.cursor_watch_unavailable', ...) (source.js:203). Demonstrated in round 2 by making fs.watch() throw:
not ok 2 - source runs shortly after boot and reports structured completion-relative cadence
error: 'runtime.log.warn is not a function'
Unreachable with a healthy mkdtemp directory on Linux, so minor, but inotify exhaustion on a shared CI runner turns a real assertion into a TypeError. One-token fix: spread ...silentLog (already imported at :11) before the capturing overrides.
Acceptance
- The
source.js:158-161comment no longer claims the stderr mirror can throw at this call site, and the reorder (schedulebeforeruntime.log.info) is untouched. - The
Only ever shortensparagraph scopes theseenImportsclaim to ticks that return and points the throwing-tick consequence at #2127. - The
test:80-90fixture survives a throwingfs.watchinto a realwarn(anfs.watch-throws run fails tests 10-12 for the legitimate no-watcher reason, never withruntime.log.warn is not a function). test/plugins/github-source.test.jsstays green (12/12) andnpm test/npm run typecheckstay clean.
- 主要言語
- JavaScript
- スター
- 11
- フォーク
- 0
- 平均マージ
- 2時間 25分
- マージ済み PR(30日)
- 311
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hyparam/hypaware のほかの issue
-
Windows: mutation guard rethrows EPERM from a lock dir being deleted, so the ingest-seq reserve skips its retry対応中かも @HypForge が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
hyparam/hypaware#2886 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
docs: ollama.md says --source ollama adds to an existing install, but without --force it refusesオープン
難易度 2/5 1時間未満 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
report_commands.js runtime output still says 'server' in four places; one names the destinationオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
hyparam/hypaware の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Fei-Away/Codex-Dream-Skin#449 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
outline/outline#14489 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Claude Code plugin does not wire the edit-time Floor hook対応中かも @dgr8akki が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
Administration: required plugin configuration field stays invalid after restoring its saved valueオープンneeds-triage Platform(Default)
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信