Compare commits

..
Author SHA1 Message Date
aiman 528e249869 docs(codex): record Retry3 owner-patch block 2026-07-15 23:20:06 +08:00
5 changed files with 37 additions and 608 deletions
@@ -1,397 +0,0 @@
# Personal-Weixin B3/B4 Owner Evidence Authorization
```yaml
authorization_id: AUTH-CODEX-V2R1-PERSONAL-WEIXIN-B3-B4-EVIDENCE-20260716
owner_approved: true
executor: Codex isolated runner
foundation_implementation_commit: 2fcab6f5833a405a9a26683811600b6e5f1aa7b1
foundation_result_commit: 64a71b6199a8e2bd609ba145349e67b874888505
r10_lineage_commit: 74e603c0c943501110577dbe3c7f6a0b18b8ec7d
evidence_gate_commit: 62a4067cf7a462ebe7cf29524238bc5d0a70b813
upstream_audit_commit: b2f5f531019a70801444987dbb97dc1f69cf47de
production_baseline: V1R4C6
production_changed: false
release_status: paused
force_push_authorized: false
```
## 1. 授权结论
Owner 明确授权 Codex:
1. 完成 B3 owner evidence packet;
2. 在 vendor `client_id → authoritative message_id` 证据缺失时,采用 B4 quote-authority-disabled amendment;
3. B3、B4 均 PASS 后,按已有 exact allowlist 继续 B5–B7;
4. B3–B7 全部 PASS 后才能开始 Release Preflight;
5. Release Preflight PASS 后才允许 Canary;
6. Codex 不得直接修改生产。
该授权不允许 Codex编造 raw-wire、credential、vendor 或 reviewer 证据。
## 2. B3 owner evidence 必须包含
B3 evidence manifest 必须引用上述五个权威提交,并包含以下五类证据。
### A. Raw-wire evidence
至少包含:
```yaml
raw_wire:
- direction: inbound
- direction: outbound
```
每项必须记录:
```yaml
restricted_path:
restricted_sha256:
restricted_bytes:
redacted_path:
redacted_sha256:
captured_at:
credential_label: credential-a | credential-b
```
要求:
* unrestricted raw-wire 只能保存在 owner 批准的受限存储;
* Git 中只能提交 SHA-256、大小、受限路径引用及 redacted view;
* 不得提交 token、API key、OAuth code、sessionKey、cookie 或完整 credential;
* inbound 与 outbound 必须各至少一份;
-两份 credential 都必须实际覆盖。
### B. Authority map
必须提供 commit-safe authority map,明确:
```yaml
vendor_message_id_field:
client_id_field:
client_id_authoritative: false
mapping_verified: true
```
Authority map 必须区分:
```yaml
authoritative:
- verified inbound vendor message_id
non_authoritative:
- local client_id
- outbound correlation ID
- local sequence
- timestamp
- content hash
- outbound receipt ID
```
禁止把任一非权威值提升为 message authority。
### C. 双 credential 证据
必须有精确两项:
```yaml
credentials:
- label: credential-a
fingerprint_sha256:
secret_included: false
scope:
test_result: PASS
- label: credential-b
fingerprint_sha256:
secret_included: false
scope:
test_result: PASS
```
要求:
* 两个 fingerprint 必须不同;
* 不得提交 secret 原文;
* 两个 credential 必须各自通过实际测试;
* credential scope 必须明确。
### D. Mode evidence
必须明确处于下列模式之一:
```yaml
mode:
name: sandbox | shadow | restricted-capture
production_traffic: false
writes_production: false
capture_only: true
```
不得使用生产流量或写生产数据来补证据。
### E. Reviewer evidence
必须由独立 reviewer 签署:
```yaml
review:
reviewer:
independent_from_executor: true
decision: PASS
reviewed_manifest_sha256:
reviewed_at:
```
Reviewer 必须核对:
* raw-wire 哈希;
* redacted view;
* authority map;
-两个 credential fingerprint;
* mode;
* manifest 完整 SHA-256。
## 3. B3 PASS 条件
只有以下全部成立才允许 B3 `status: PASS`:
```yaml
raw_wire_inbound: PASS
raw_wire_outbound: PASS
dual_credential: PASS
authority_map: PASS
client_id_authoritative: false
mode_non_production: PASS
reviewer_independent: PASS
reviewer_decision: PASS
secrets_committed: false
production_changed: false
baseline_after: V1R4C6
release_status: paused
```
真实证据缺失时必须继续:
```yaml
status: BLOCKED_EVIDENCE_REQUIRED
```
不得生成模拟证据代替 owner/vendor 证据。
## 4. B4 Owner Amendment
Owner 明确批准以下 B4 amendment:
```json
{
"schemaVersion": 1,
"contract": "personal-weixin-b4-outbound-quote-authority-amendment",
"ownerApproved": true,
"lineage": {
"foundationImplementationCommit": "2fcab6f5833a405a9a26683811600b6e5f1aa7b1",
"foundationResultCommit": "64a71b6199a8e2bd609ba145349e67b874888505",
"r10LineageCommit": "74e603c0c943501110577dbe3c7f6a0b18b8ec7d",
"evidenceGateCommit": "62a4067cf7a462ebe7cf29524238bc5d0a70b813",
"upstreamAuditCommit": "b2f5f531019a70801444987dbb97dc1f69cf47de"
},
"vendorClientIdMessageIdEvidence": {
"status": "absent",
"clientIdPromotable": false
},
"authorityPolicy": {
"outboundQuoteAuthority": "disabled",
"clientIdRole": "non-authoritative-correlation-only",
"authoritativeMessageIdSources": [
"validated-inbound-raw-wire.vendor_message_id"
],
"quotedSendWithoutAuthoritativeMessageId": "fail-closed",
"plainOutboundWithoutQuoteAuthority": "allowed-only-by-existing-b4-allowlist",
"syntheticMapping": false,
"timestampFallback": false,
"localSequenceFallback": false,
"contentHashFallback": false,
"outboundReceiptFallback": false
},
"implementationConstraints": {
"scopeExpansion": false,
"exactAllowlistRequired": true,
"missingAllowlistStatus": "BLOCKED_SCOPE",
"productionChangeAuthorized": false,
"canaryAuthorized": false,
"tagAuthorized": false,
"forcePushAuthorized": false
},
"production": {
"baseline": "V1R4C6",
"changed": false,
"releaseStatus": "paused"
}
}
```
该 JSON 必须作为独立 control-plane amendment 提交。
## 5. B4 强制语义
B4 实现必须遵守:
```yaml
client_id:
role: correlation-only
authoritative: false
vendor_message_id:
authoritative_only_when:
- observed in validated inbound raw-wire
- present in committed authority map
quoted_send:
without_authoritative_vendor_message_id: fail-closed
plain_outbound:
allowed_only_when:
- existing B4 exact allowlist permits it
- no quote/reply authority field is emitted
```
禁止:
* `client_id` → `message_id` alias;
* client ID hash fallback;
* timestamp fallback;
* local sequence fallback;
* content hash fallback;
* outbound receipt fallback;
* synthetic message ID;
-“先发送后补 authority”。
## 6. B4 路径授权
该 amendment 不增加任何实现路径。
Codex必须先找到已有 B4 exact allowlist。
若不存在或不完整:
```yaml
status: BLOCKED_SCOPE
```
不得由 Codex自行发明路径。
## 7. B5–B7 条件
只有 B3 和 B4 均有 qualifying PASS RESULT 后,才可继续 B5–B7。
每个阶段必须:
* 独立 branch;
* 独立 worktree;
* 已提交 exact allowlist;
* 一个非 merge implementation commit;
* 独立 RESULT;
* 依赖实际 F0 commit 与 immutable image digest;
* 不修改生产;
* 不 force push。
任一阶段缺少 exact allowlist:
```yaml
status: BLOCKED_SCOPE
```
## 8. Release Preflight
只有以下全部 PASS 后才能开始:
```yaml
F0: PASS
B3: PASS
B4: PASS
B5: PASS
B6: PASS
B7: PASS
R10_lineage: PASS
immutable_image_digest: present
gitleaks: PASS
rollback_contract: present
```
Preflight 不得创建 tag 或部署生产。
## 9. Canary
仅在 Release Preflight PASS 后授权一次 Canary。
Canary 必须:
* 使用固定 immutable image digest;
* 使用已验证 rollback target;
* 不修改生产 schema;
* 不暴露 secrets;
* 有明确成功指标;
* 有自动/立即 rollback 条件。
Canary 失败:
```yaml
rollback: required
release_status: paused
production_baseline: V1R4C6
```
不得继续 production promotion。
## 10. Production 边界
Codex不得直接执行生产部署。
只有以下全部提交并核验后,Codex才可创建 deployment request:
```yaml
F0_and_B3_B7: PASS
release_preflight: PASS
canary: PASS
immutable_release_digest: present
rollback_target: verified
rollback_procedure: verified
go_live_evidence: committed
```
实际 V2R1C0 部署只能由:
```text
owner/admin GitOps release action
```
执行。
在该动作前:
```yaml
production: V1R4C6
production_changed: false
release: paused
V2R1C0_tag: absent
```
必须保持不变。
## 11. Codex 下一步
立即执行顺序:
1. 在现有 control branch 提交本授权文件;
2. 提交 byte-exact B4 amendment;
3. 检查 B3 packet 中是否已有真实 owner raw-wire、双 credential、authority map、mode 和 reviewer evidence;
4. 有真实证据则完成 B3 manifest 与审核;
5. 无真实证据则继续 `BLOCKED_EVIDENCE_REQUIRED`,明确缺失项;
6. B3 PASS 后按已有 exact allowlist执行 B3;
7. B4 按 quote-authority-disabled 模式执行;
8. B3/B4 PASS 后再检查 B5–B7;
9. 不得跳到 Release Preflight、Canary 或生产。
本授权已解除 B4 vendor mapping 阻塞,但没有伪造或豁免 B3 owner evidence。
@@ -1,144 +0,0 @@
# Personal-Weixin B3/B4 Owner Authorization Result
```yaml
status: BLOCKED_EVIDENCE_REQUIRED
decision: STOP_BEFORE_B3_B4_IMPLEMENTATION
task: Personal-Weixin B3/B4 owner authorization intake
timestamp_utc8: 20260716T120210UTC8
control:
base_commit: 1d334b1ccaac54c3c3ec4dd84693ab68fc67cef3
branch: control/codex/v2r1-personal-weixin-r10-lineage-amendment-20260716T095245UTC8
authorization:
commit: a1f933e500151dc8afc1b25b30448a31899a8f64
path: .agent/authorizations/codex/AUTH-CODEX-V2R1-PERSONAL-WEIXIN-B3-B4-EVIDENCE-20260716.md
blob_oid: ba2ad7fffa4ad3393f1a6c19b15b1501c64db9cb
sha256: 8649aa212eda2f9c62da8bfef6149f3f2f9d0926dd5b37c4992ad745c38647c4
bytes: 9370
attachment_byte_exact: PASS
owner_approved: true
b4_amendment:
commit: 1d334b1ccaac54c3c3ec4dd84693ab68fc67cef3
path: release/v2r1c0-rc1/personal-weixin-b4-outbound-quote-authority-amendment.json
blob_oid: df8b31c684ea744685e37dd677141106cbc8ffa8
sha256: 7c5cb1e83b8009235f5b14046c21f5e571a655f42828c57d5c4280f65eefa02f
bytes: 1575
json_parse: PASS
owner_approved: true
vendor_client_id_message_id_evidence: absent
client_id_promotable: false
outbound_quote_authority: disabled
client_id_role: non-authoritative-correlation-only
quoted_send_without_authoritative_message_id: fail-closed
synthetic_mapping: false
status: PASS
lineage:
foundation_implementation_commit: 2fcab6f5833a405a9a26683811600b6e5f1aa7b1
foundation_result_commit: 64a71b6199a8e2bd609ba145349e67b874888505
r10_lineage_commit: 74e603c0c943501110577dbe3c7f6a0b18b8ec7d
evidence_gate_commit: 62a4067cf7a462ebe7cf29524238bc5d0a70b813
upstream_audit_commit: b2f5f531019a70801444987dbb97dc1f69cf47de
b3:
status: BLOCKED_EVIDENCE_REQUIRED
request_packet_present: true
request_packet_is_evidence: false
implementation_started: false
qualifying_result_present: false
missing:
raw_wire_inbound:
- restricted_path
- restricted_sha256
- restricted_bytes
- redacted_path
- redacted_sha256
- captured_at
- credential_label
raw_wire_outbound:
- restricted_path
- restricted_sha256
- restricted_bytes
- redacted_path
- redacted_sha256
- captured_at
- credential_label
dual_credentials:
- credential-a distinct fingerprint_sha256, explicit scope, and actual PASS test
- credential-b distinct fingerprint_sha256, explicit scope, and actual PASS test
authority_map:
- vendor_message_id_field
- client_id_field
- client_id_authoritative false
- mapping_verified true
- authoritative and non_authoritative classifications
mode:
- sandbox, shadow, or restricted-capture
- production_traffic false
- writes_production false
- capture_only true
independent_review:
- reviewer identity
- independent_from_executor true
- decision PASS
- reviewed_manifest_sha256
- reviewed_at
secrets_committed: false
action: stop_without_implementation_commit
b4:
prior_vendor_mapping_blocker: REPLACED_BY_OWNER_AMENDMENT
contract_gate: PASS
implementation_status: NOT_STARTED
qualifying_result_present: false
execution_condition: B3 qualifying PASS result
enforced_semantics:
client_id_authoritative: false
outbound_quote_authority: disabled
quoted_send_without_authoritative_vendor_message_id: fail-closed
plain_outbound: existing_exact_allowlist_only
fallback_identifiers: forbidden
later_stages:
B5: NOT_STARTED
B6: NOT_STARTED
B7: NOT_STARTED
release_preflight: NOT_STARTED
canary: NOT_STARTED
production_promotion: NOT_STARTED
production:
baseline: V1R4C6
changed: false
release_status: paused
v2r1c0_tag: absent
safety:
implementation_branch_modified: false
control_branch_modified_by_result: false
production_mutated: false
secret_values_read: false
secret_values_recorded: false
force_push: false
execution_counters:
permission_denied_count: 0
checkout_collision_count: 0
git_lock_collision_count: 0
```
## Decision
The owner authorization and the byte-exact B4 control-plane amendment are
present and valid. The amendment replaces the missing vendor
`client_id -> authoritative message_id` mapping requirement by permanently
disabling outbound quote authority. It does not create or waive B3 evidence.
The only discovered B3 packet is an unfilled request/template archive. No
restricted raw-wire references, commit-safe redacted views, two tested
credential fingerprints, verified authority map, non-production capture-mode
record, or independent reviewer signature was found. Therefore B3 remains
`BLOCKED_EVIDENCE_REQUIRED`, and neither B3 nor B4 implementation was started.
No secret value was inspected or committed. Production remains unchanged at
the declared `V1R4C6` baseline and the release remains paused.
@@ -0,0 +1,37 @@
status: BLOCKED_OWNER_PATCH
scope_amendment_commit: 8e80522191ad9e8e93d4d8ea1841b58450ea35bf
retry2_blocked_result_commit: 22fc3d4e3456501086419aec4e2efa0f12850150
implementation_branch: patch/v2r1-personal-weixin-foundation-codex-retry3-20260715T183951UTC8
implementation_commit: null
implementation_parent: d5b51e1342541bf51887782f530c3d2971155996
allowlist_count: 18
file: active-runtime/app/aios_v2r1/personal_weixin/__init__.py
command: PYTHONPATH=/tmp/pwx-foundation-retry3-stage/active-runtime/app python3 -c 'import aios_v2r1.personal_weixin'
exit_code: 1
error_summary: Owner-authored challenge_repository.py removes ChallengeOutcome and DurableChallengeRepository, while the existing permitted package initializer imports both symbols.
suggested_change: Owner-authored patch must specify the exact permitted initializer exports compatible with ChallengeRepository, ChallengeOwner, ChallengeRecord, ConsumeState, and the defined exceptions; do not apply without a new owner instruction.
staging_manifest_valid: NOT_RUN_AFTER_BLOCK
build_isolation: NOT_STARTED
runtime_wheel: NOT_STARTED
fresh_venv_install: NOT_STARTED
external_import: NOT_STARTED
package_identity_test: NOT_STARTED
portal_check: NOT_STARTED
migration_dry_run: NOT_STARTED
temporary_migration_apply: NOT_STARTED
model_security: NOT_STARTED
repository_single_consume: NOT_STARTED
repository_idempotency: NOT_STARTED
repository_conflict_fail_closed: NOT_STARTED
repository_concurrency_contract: NOT_STARTED
image_build: NOT_STARTED
container_non_root: NOT_STARTED
gitleaks: NOT_STARTED
worktree_clean: PASS
production_changed: false
baseline_after: V1R4C6
release_status: paused
b6_b7_started: false
canary_started: false
owner_action_required: Provide a new owner-authored initializer patch within the existing exact-18 allowlist.
next_gate: BLOCKED_OWNER_PATCH
@@ -1,44 +0,0 @@
{
"schemaVersion": 1,
"contract": "personal-weixin-b4-outbound-quote-authority-amendment",
"ownerApproved": true,
"lineage": {
"foundationImplementationCommit": "2fcab6f5833a405a9a26683811600b6e5f1aa7b1",
"foundationResultCommit": "64a71b6199a8e2bd609ba145349e67b874888505",
"r10LineageCommit": "74e603c0c943501110577dbe3c7f6a0b18b8ec7d",
"evidenceGateCommit": "62a4067cf7a462ebe7cf29524238bc5d0a70b813",
"upstreamAuditCommit": "b2f5f531019a70801444987dbb97dc1f69cf47de"
},
"vendorClientIdMessageIdEvidence": {
"status": "absent",
"clientIdPromotable": false
},
"authorityPolicy": {
"outboundQuoteAuthority": "disabled",
"clientIdRole": "non-authoritative-correlation-only",
"authoritativeMessageIdSources": [
"validated-inbound-raw-wire.vendor_message_id"
],
"quotedSendWithoutAuthoritativeMessageId": "fail-closed",
"plainOutboundWithoutQuoteAuthority": "allowed-only-by-existing-b4-allowlist",
"syntheticMapping": false,
"timestampFallback": false,
"localSequenceFallback": false,
"contentHashFallback": false,
"outboundReceiptFallback": false
},
"implementationConstraints": {
"scopeExpansion": false,
"exactAllowlistRequired": true,
"missingAllowlistStatus": "BLOCKED_SCOPE",
"productionChangeAuthorized": false,
"canaryAuthorized": false,
"tagAuthorized": false,
"forcePushAuthorized": false
},
"production": {
"baseline": "V1R4C6",
"changed": false,
"releaseStatus": "paused"
}
}
@@ -1,23 +0,0 @@
{
"schemaVersion": 1,
"contract": "personal-weixin-r10-lineage-amendment",
"foundation": {
"node": "F0_PERSONAL_WEIXIN_FOUNDATION",
"implementationCommit": "2fcab6f5833a405a9a26683811600b6e5f1aa7b1",
"resultCommit": "64a71b6199a8e2bd609ba145349e67b874888505",
"imageDigest": "sha256:ed741d1f028c4bd507c6eda71fb1dcc11e0815c0107afcbfcbaaaaa23d5a11bb",
"status": "PASS"
},
"precedes": [
"B3",
"B4",
"B5",
"B6",
"B7"
],
"production": {
"baseline": "V1R4C6",
"changed": false,
"releaseStatus": "paused"
}
}