Skip to content

Fix Windows Codex hook byte extraction and UTF-8 reads - #2172

Merged
lipluscodex merged 1 commit into
mainfrom
2171-fix-byte-safe-source-extraction-and-utf-8-loading-in-windows-hooks
Oct 5, 2026
Merged

lipluscodex merged 1 commit into
mainfrom
2171-fix-byte-safe-source-extraction-and-utf-8-loading-in-windows-hooks

Conversation

@lipluscodex

@lipluscodex lipluscodex commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Codex Luna:

Closes #2171
Windows PowerShell 5.1 の SessionStart でタグ固定 skills/docs のバイトを archive ファイル経由で保持し、両 exit code と必要ファイルを確認する。解決済みタグの展開失敗は更新要求を出して停止する。
ルール注入・anchor・検索を含む source/config/state の UTF-8 読取りを明示し、日本語本文の文字化けを解消する。

検証:PS5.1 と pwsh の実プロセスで4 matcher、Unicode本文・anchor・タグ固定資料、全256バイト値を含む資料の一致、git失敗・tar失敗・exit 0 の空/部分展開、cleanup、未解決タグの既存 fallback を確認。installed rules の既存両port fixture 7件も成功した。API mode の既存3 port fixture 4件も成功した。push/PR の governance CI は両方成功。

委任選択:モデルは親を継承、effort=medium。タグ抽出・Unicode読取り・PS5.1実プロセスを横断するため最初から medium を選択し、low は試していない。誤りはfixture/CIで検出する。

— Luna

Codex Luna:
#2171 の Windows PowerShell 5.1 で、タグ固定 skills/docs をバイナリファイル経由で展開し、exit と必要ファイルを確認してから採用する。解決済みタグの失敗を working tree で隠さない。
ルール・anchor・関連 source/config/state の UTF-8 読取りを明示し、Unicode とバイナリ一致・失敗・cleanup の実プロセス fixture と対応仕様を追加した。

— Luna
@lipluscodex

Copy link
Copy Markdown
Member Author

Codex Luna:Adjudicate each finding below by checking its literal against the source at the revision its path:line is given at, and adopt or drop it on that. No count enters that judgment, and no axis is exempt from it: the fixed impression-literal axis is adjudicated the same way, on the flagged phrase against the removal test its own spec fixes (skills/evolution-impression-literal-detection/SKILL.md), and it fixes no threshold.

評価基準 SHA: 252d6c43d3726468deb5fa94b129c8ad39a2ad05。投稿直前の head 一致と既存コメントなしを確認。

  • Axis A — 指摘なし。Issue Fix byte-safe source extraction and UTF-8 loading in Windows hooks #2171 全文の目的・5制約・対象ファイル・マージ後のローカル完了条件と、変更4ファイルを照合した。adapter/codex/hooks/on-session-start.ps1 の完全な本文、tests/test_codex_windows_source_loading.py:1-131、adapter/codex/hooks-config.md:223-231、docs/6.-Adapter.md:89 の読取範囲に Issue との不一致はない。マージ後の workspace 適用は明示された後続条件として扱った。
  • Axis B — 指摘なし。変更・追加行を rules/model/liplus-coding-rule.md、rules/model/rule-policy.md、rules/model/subtractive-structural-beauty.md、rules/model/axis-separation.md、rules/model/absolute.md、rules/task/task.md、rules/evolution/cold-start-synthesis.md、rules/evolution/evolution.md、rules/evolution/promotion-judgment.md、skills/operations-on-docs-ownership/SKILL.md と、英語仕様 adapter/codex/hooks-config.md:202-237/日本語仕様 docs/6.-Adapter.md:89 に照合した。確認した各行は確認した拘束規則が許容している。
  • Fixed impression-literal — clean。PR Fix Windows Codex hook byte extraction and UTF-8 reads #2172 の追加・変更 Li+ instruction prose 11行(adapter/codex/hooks-config.md:223-231 の9行と adapter/codex/hooks/on-session-start.ps1:226-227 の marker・診断2行)を指定 skill の除去試験で確認し、指摘なし。実行コード・script comment・banner の区切り・tests は instruction prose と区別した。
  • 削除確認 — 置換されずに失われた、指定 SHA でも真かつ必要な行はない。追加・変更された時間依存の事実について、出典・観測の裏付けを欠く指摘はない。

— Luna

@lipluscodex lipluscodex left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Luna:

自己レビュー:pass。対象HEADは 252d6c43d3726468deb5fa94b129c8ad39a2ad05。Issue #2171、変更4ファイルのdiffと本文、両CI、PRコメント全文を確認した。

  • タグ固定のskills/docsをarchiveファイル経由で展開し、git/tarの両exitと必要ファイルを確認してから採用する。解決済みタグの失敗は更新要求を出して停止し、未解決タグの既存契約を保持する。
  • installed rulesの本文・anchor・検索と関連するsource/config/stateの読取りがUTF-8を明示する。native config/profile、context上限、trust、Claude、ルールの配置方式に変更はない。
  • PS5.1/pwshの実プロセスfixtureで4 matcherのUnicode、タグ固定資料、全256バイト値の一致、失敗・空/部分展開、cleanupと未解決タグを検証。旧フックでは新fixtureが失敗することも確認した。installed rules/API modeの既存port検証と、push/PRの全455テスト(skip 1)が成功した。
  • 制約と対象ファイルに対する逸脱なし。仕様変更は英語のhooks-configと日本語のAdapter文書を同じPRで更新した。

Brake 1:N=1、M=all、P=1、1 round-trip。別エージェントのA/B/fixed各軸はcleanで、採否判断を要する指摘はない。親がコメント全文を読んだうえでマージ可と判断した。
実装delegate:親モデル継承/medium。タグ展開・Unicode・PS5.1の実プロセス検証を横断するためmediumを初期選択し、lowは未実施。Evaluator:gpt-6.1-sol/low。限定4ファイルのliteral照合とfixture/CIが後段で誤りを検出するためlowを選択し、引上げなし。

分類:patch。rules/operations/release-version-rule.mdをliteral読取して判断した、小規模なWindowsのバイト・文字コード修復であり、大規模な構造変更ではない。semi_autoのpatchとして親が直接squash mergeする。

workspace側の後続:確定タグをbackup付き適用し、config/profileのハッシュ、24rulesのバイトとcharacter除外、PS5.1での展開とUnicode本文を確認する。Issueのローカル完了条件はマージだけで満たされないため、直後に再オープンする。前PRの作業用クローン削除は実行ポリシーに拒否され、残っている(理由表示 blocked by policy)。この制約は設定適用とは別に報告する。

— Luna

@lipluscodex
lipluscodex merged commit 5ff75b9 into main Oct 5, 2026
2 checks passed
@lipluscodex
lipluscodex deleted the 2171-fix-byte-safe-source-extraction-and-utf-8-loading-in-windows-hooks branch October 5, 2026 03:43
@lipluscodex

Copy link
Copy Markdown
Member Author

Codex Luna:

マージ後の観測entryは作成しない。変更したバイト展開・必要ファイル確認・UTF-8読取りは実プロセスfixtureとCIが検出するため、creation criterionの「実行済み機構が破損を検出しない」を満たさない。L1 sourceの変更はない。

ローカル完了条件は未達なのでIssue #2171を再オープンした。確定タグのbackup付き適用と実機照合を続ける。

— Luna

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix byte-safe source extraction and UTF-8 loading in Windows hooks

1 participant