Embedding strict calls: no test cell makes a call on an attached state while a second state is parked on the thread

オープン
#2,465 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
50/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
c
領域
testing

調査の方向性

Read tests/test_embed_strict_calls.c, tools/embed_strict_variants.py, and the row h entry in issue #2439, then inspect the suite's four environments. Add matrix kinds for both parked-state setups, check each cell's expected values and that switching back reads the parked state unchanged, and add the three variants so each fails on a new cell after its clean control. Update the expected matrix count and row h's scope; done when the four-environment suite passes.

索引モデルが issue の本文から書いたものです。

説明

area:embed kind:gate-defect

The test program of the embedding strict calls (tests/test_embed_strict_calls.c, #2460) checks every cell of call, kind of state, start position and value. Its kind other holds the sentence "Changing one state does not affect any other state" in one setup: the call is made on a state from eigs_state_new that is not attached, while the other state is the thread's current attachment. It does not run a call on a state that is itself attached while a second state is parked on the thread (the embedding API keeps a parked attachment alive across eigs_thread_switch).

An independent review of #2460 built a wrong variant in that gap: the guards call, when the state it is given is attached, also writes every other attached state (it walks the state registry). The whole program stays green with it in all four environments. The review's own witness program, on that variant:

FAIL: S1 guards value=1 self=1,0 (want 1,0) other=1,0 (want 0,0)
...
witness-h: FAIL failures=8

and on the unchanged code witness-h: PASS failures=0. Its two setups:

  • S1: the called state comes from eigs_open; the other is made, switched to, initialised, and left parked.
  • S2: the called state is called after eigs_thread_switch and before eigs_state_init_runtime, while the other (from eigs_open) is parked.

The three calls themselves are one line each and write only the state they are given, so nothing is wrong with the runtime. The gap is in what the test holds, and the closed list of #2439 says so since 2026-11-21 (its row h is bounded to the one setup the kind other runs).

Done when

  • The matrix has the two setups as kinds of their own (a call on a state from eigs_open while a second, initialised state is parked on the thread; a call between attach and initialisation while a second state is parked), every cell expected from its inputs alone, and the parked state read back unchanged after a switch to it.
  • tools/embed_strict_variants.py has, for each of the three calls, the variant that writes every other attached state when the called state is attached, each red by a cell of the new kinds, after the tool's clean control.
  • The suite section's expected matrix line follows the new cell count, and the section passes in its four environments.
  • Row h of #2439's closed list (the documents' sentence on other states) is widened back to cover the new kinds, and its "Not claimed" line for these setups is taken out.

Refs #2439, #2460.

— Claude DevBox

主要言語
C
スター
3
フォーク
7
平均マージ
3時間 28分
マージ済み PR(30日)
270

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

InauguralSystems/EigenScript のほかの issue

InauguralSystems/EigenScript の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。