Repository navigation
#677 [ci][tests] CI の runner は legacy_tiocsti=0 で TIOCSTI の拒否を測れず、判定もログに残らない - #679
Merged
Kewton merged 1 commit intoOct 15, 2026
Conversation
Set dev.tty.legacy_tiocsti=1 before the acceptance suite in the commandagent-guardrails job, logging the outcome and never failing the job when the kernel refuses the write, and print the resulting value. Pass $RUNNER_TEMP/probe-verdicts.txt to the test step through COMMANDAGENT_PROBE_VERDICT_FILE, and add an if: always() step that cats the file and turns every UNVERIFIED line into a ::warning:: annotation (a missing or empty file also warns). The four issue667 probes append one verdict line each - BLOCKED or UNVERIFIED with the reason, plus the legacy_tiocsti value for TIOCSTI - so the verdict reaches the job log and the check-runs annotations; the existing stdout and $GITHUB_STEP_SUMMARY output is unchanged, and an unset variable keeps the previous local behaviour. 判断: the verdict line reuses the $GITHUB_STEP_SUMMARY format (issue667/<probe>: blocked|unverified ...), so the reporting step matches UNVERIFIED case-insensitively 判断: scripts/ci.sh needs no change; the workflow passes the target file through the test step's env 本文に無い指摘: a code reading (not measured locally - the two-point measurement is the leader's Docker run) says removing setsid() alone still leaves the /dev/null stdin detachment, which blocks TIOCSTI on fd 0, so a copy with only setsid() removed keeps reporting BLOCKED Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
This was referenced Oct 15, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Refs #677
概要
GitHub-hosted の Ubuntu の runner では kernel が
dev.tty.legacy_tiocsti=0なので、#667 の TIOCSTI の試験は毎回 UNVERIFIED になります。しかも判定(BLOCKED・UNVERIFIED)は CI のログに残りません。この PR は、CI で TIOCSTI の拒否を測れるようにし、probe の判定を job のログと annotation で読めるようにします。変更の要約
.github/workflows/ci.yml(commandagent-guardrailsの job)Enable legacy TIOCSTI for the isolation probes(試験の前)sudo sysctl -w dev.tty.legacy_tiocsti=1を実行します。書けない kernel でも job は落とさず、could not write … (exit N)をログに出します。sysctl -n dev.tty.legacy_tiocstiの値を出します。CAP_SYS_ADMINでは流しません。そうすると負の対照も注入できてしまい、正しく測れないからです。Repository acceptance suite:COMMANDAGENT_PROBE_VERDICT_FILE=${{ runner.temp }}/probe-verdicts.txtを渡します。Report isolation probe verdicts(if: always())catします。::warning::を出します。::warning::を出します。tests/issue502_os_sandbox_write.rsCOMMANDAGENT_PROBE_VERDICT_FILEが設定されているとき、4 つの probe の判定を 1 行ずつ追記します。legacy_tiocstiの値つき)、stdin、devnull-fd、terminal-read。$GITHUB_STEP_SUMMARYへの記録と同じ扱いです)。$GITHUB_STEP_SUMMARYへの出力、assert!、期待、#[ignore]、UNVERIFIED の扱い。scripts/ci.shは変えていません。利用者に見える挙動の変化
src/)は変えていません。CommandAgent Test and Guardrailsの job に step が 2 つ増えます(sysctl と判定の報告)。検証
commandmate verifypassed 15/15。HEAD4d882fd5で、最後の commit の後、clean です。cargo-zigbuild clippy --all-targets --target x86_64-unknown-linux-gnuexit 0。bash -n scripts/ci.sh、shellcheck scripts/*.sh、actionlint .github/workflows/ci.ymlは exit 0 です。python の yaml でも読めます。legacy_tiocsti=1、uid 1000、--network none、mount なし、CapEff 0。CI=true、変数あり):28 passed。ファイルには次の 4 行が書かれました。bash -eo pipefailで流した)。どれも exit 0 です。::warning::が 1 件。::warning::。configure_child_sessionを [security][tools] OS の隔離の中から制御端末へ TIOCSTI で入力を注入でき、/dev/pts の他の端末へ書ける #667 の前のprocess_group(0)に戻した写し。setsid も stdin の付け替えもなし):isolated_child_cannot_inject_into_the_controlling_terminalは FAILED でした(an isolated child injected into the controlling terminal: master echoed "Y")。setsidだけを外し、detach_terminal_stdinは残した写し):/dev/nullに付け替えられ、fd 0 への TIOCSTI がそもそも成り立たないからです。bounded_child_runs_in_its_own_session_and_process_group(sid = pid の確認)が FAILED で検出します。未決定の点
🤖 Generated with Claude Code