Compare commits

..
Author SHA1 Message Date
openclaw b90b0b9d26 fix: update baseline git hash to latest and fix docs/releases ownership to aiman 2026-07-11 02:33:16 +08:00
openclaw a32c76a3c1 V1R4C5 baseline promotion: V1R4C3 -> V1R4C5
promoted_by: openclaw/admin

promotion_reason: V1R4C5 reliability, watcher cleanup, user data isolation gate, and admin workbench read-only preparation; memory search remains disabled

constraints: memory_search_enabled=false, force_push_allowed=false
2026-07-11 02:19:22 +08:00
openclaw c128d6b01d release: complete V1R4C5 metadata on final approval branch 2026-07-11 02:10:39 +08:00
openclaw d457ac3961 release: record final owner approval for V1R4C5 2026-07-11 01:58:14 +08:00
openclaw 9fa7511bb5 release: add V1R4C5 acceptance evidence 2026-07-11 01:56:45 +08:00
348 changed files with 3561 additions and 11041 deletions
@@ -1,32 +0,0 @@
{
"contract_commit": "cbe33ecab8e9794ba5f318bea43aeaf447a56fbc",
"created_at": "2026-07-17T14:13:38+00:00",
"schema_version": 1,
"state_writer": "openclaw",
"work_units": [
{
"fallback": "codex",
"gate": "R0_RUNNER_LIVE_RECOVERY",
"id": "R0-DISCOVER-SECRET-PROVIDER",
"primary": "openclaw",
"status": "READY",
"track": "R_RUNNER"
},
{
"fallback": "codex",
"gate": "P2_REAL_B3_EVIDENCE",
"id": "P2-INVENTORY-REAL-EVIDENCE",
"primary": "openclaw",
"status": "READY",
"track": "P_PERSONAL_WEIXIN"
},
{
"fallback": "openclaw",
"gate": "P1_REPAIR3_CODE",
"id": "P1-POST-CONTRACT-REACK",
"primary": "codex",
"status": "READY",
"track": "P_PERSONAL_WEIXIN"
}
]
}
@@ -1,157 +0,0 @@
{
"adaptive_dispatch": {
"codex_first": [
"complex_code",
"security_boundary",
"architecture",
"high_risk_review",
"strong_model_materially_better"
],
"default_orchestrator": "openclaw",
"dual_required": [
"release_gate",
"crypto_or_identity_change",
"production_migration_or_rollback"
],
"max_attempts_per_work_unit": 2,
"on_timeout": [
"mark_TIMEOUT",
"preserve_logs",
"switch_agent"
],
"openclaw_first": [
"quality_close",
"large_or_repetitive",
"long_running",
"infra_or_git_inventory",
"cost_sensitive"
],
"single_state_writer_lease_required": true,
"strict_role_partition": false,
"timeout_can_pass": false
},
"authoritative_state": {
"b3": "BLOCKED_EVIDENCE_REQUIRED",
"b4": "NOT_STARTED",
"baseline": "V1R4C6",
"production_release": "NOT_STARTED",
"release": "paused",
"repair3": {
"base": "8d9c6da90fc8caa69b691d243c6fefb40b6b0575",
"candidate": "PASS_CANDIDATE_PREPARED",
"commit": "e110cda9968cadc5c7b7179ec5003b05aad11ce4",
"exact4": "PASS",
"result": "49a9c2e0cc898ecf2bbd45f454e007644d7f3045"
},
"runner": {
"artifact_sha256": "85c472c05a1e55a5899b215d3cd41df53912787de529ac9cb3d5308da4158130",
"commit": "bbd27cf06acf1f589eef291eab54d4b127aa3aea",
"live": "BLOCKED_GATEWAY_SECRET_REF_UNAVAILABLE",
"offline": "PASS",
"result": "e789632e359e9232d8ae081e7c4f23ed7b615a9d"
}
},
"contract_id": "V2R1-PERSONAL-WEIXIN-PRODUCTION-EXECUTION-CONTRACT",
"facts_policy": {
"accept": [
"committed_git_tree",
"full_oid",
"worktree_bare_gitea_oid_match",
"test_log_with_rc",
"immutable_digest",
"result_only_commit",
"live_evidence"
],
"reject": [
"verbal_claim",
"readme_only",
"local_only_commit",
"environment_variable_as_secret_ref",
"compile_only",
"timeout_as_pass",
"unrelated_repo",
"fabricated_evidence"
]
},
"forbidden_git": [
"reset",
"amend",
"rebase",
"force_push",
"direct_main_push",
"direct_bare_ref_mutation",
"unapproved_gitea_db_mutation",
"reuse_accident_worktree",
"delete_live_worktree_to_clear_collision"
],
"generated_at": "2026-07-17T14:13:38+00:00",
"handoff": {
"ack": "CONTRACT_ACK=<full_contract_commit_oid>",
"advance": "independent_verification_required",
"all_agents_match": true
},
"join_gate": {
"requires": [
"RUNNER_RECOVERED",
"B3_PASS",
"B4_PASS",
"INTEGRATION_PASS"
]
},
"model_policy": {
"codex": "strongest_model_actually_available_in_runtime",
"gpt_5_6": "use_only_if_exposed",
"no_unverified_model_claims": true,
"openclaw_default": "DeepSeek V4 Flash"
},
"owner_authorization": {
"adaptive_agent_assignment_authorized": true,
"agent_substitution_authorized": true,
"autonomous_execution": true,
"may_bypass_release_controls": false,
"may_bypass_secret_controls": false,
"may_fabricate_evidence": false,
"user_step_by_step_confirmation_required": false
},
"release_gates": [
"MAIN_MERGE",
"STAGING_AND_CANARY",
"PRODUCTION"
],
"schema_version": 3,
"state_rules": [
"tracks_run_parallel",
"runner_block_does_not_block_offline_work_or_evidence_inventory",
"join_requires_both_tracks",
"failure_stops_dependents",
"production_remains_V1R4C6_paused_until_production_pass"
],
"status": "ACTIVE",
"tracks": {
"P_PERSONAL_WEIXIN": {
"b3": "BLOCKED_EVIDENCE_REQUIRED",
"b4": "NOT_STARTED",
"parallel": true,
"repair3": "PASS_CANDIDATE_PREPARED",
"repair3_commit": "e110cda9968cadc5c7b7179ec5003b05aad11ce4"
},
"R_RUNNER": {
"commit": "bbd27cf06acf1f589eef291eab54d4b127aa3aea",
"current": "BLOCKED_GATEWAY_SECRET_REF_UNAVAILABLE",
"fallback": "codex",
"parallel": true,
"primary": "openclaw",
"required": [
"artifact_verified",
"approved_secret_provider_contract",
"owner_probe_verified",
"service_healthy",
"heartbeat_healthy",
"gateway_auth",
"durable_task_create_read_cancel",
"execution_channel",
"live_rollback"
]
}
}
}
@@ -1,61 +0,0 @@
# RESULT: AIOS Orchestrator Gateway v0.2 — BLOCKED
```yaml
status: BLOCKED_FULL_REPOSITORY_TEST_BASELINE_MISSING_SOURCE
bundle_sha256: 4d49e91ce65d816190ae3b6e22afe1b3f85de17f99a23e4d44f27aa770c0111f
apply_script_sha256: 16065453f10b2bec0276f43d08be03f4a77003a08881795fd8ffbb8a93f24f98
implementation_commit: 95fc4d37f0b9502945e5ba97a1f8e5a146768f6b
result_commit: HEAD
python_compile: PASS
unit_tests: PASS_41_OF_41
full_repository_tests: FAIL_BASELINE_MISSING_scripts_wechat_send_backend_py
systemd_verify: PASS
polling_recovery: PASS
workspace_agent_callback: PASS
responses_background_polling: PASS
openclaw_lifecycle_sync: PASS
gitleaks: PASS_CURRENT_TREE_AND_IMPLEMENTATION_BRANCH_HISTORY
rollback: PASS_INITIAL_REPEAT_NOOP_AND_DIGEST_MISMATCH_FAIL_CLOSED
worktree_oid: 95fc4d37f0b9502945e5ba97a1f8e5a146768f6b
bare_oid: 95fc4d37f0b9502945e5ba97a1f8e5a146768f6b
gitea_oid: 95fc4d37f0b9502945e5ba97a1f8e5a146768f6b
all_equal: true
```
## Blocking fact
The final repository-wide `unittest discover` run executed all 41 Gateway
tests successfully, then failed because the authoritative baseline does not
contain `scripts/wechat_send_backend.py`, which is imported by
`tests/test_wechat_send_backend.py`.
The same missing-file failure was reproduced read-only from clean base commit
`9195470ceb78fd57ffface3dcc38f40b75efa9d8`. The missing implementation exists
only on unrelated branch lineages and was not copied into this scoped Gateway
change. Therefore `full_repository_tests` is not PASS and the Gateway code
review is blocked fail-closed.
## Executed verification facts
- Bundle and apply-script SHA-256 values matched the supplied values before
application; all archive-internal checksums also matched.
- Python compilation passed.
- Gateway unit and negative suite passed 41 of 41, including duplicate event
conflict, stale state version, two independent SQLite worker connections,
Workspace callback timeout, Responses queued/in-progress/completed polling,
file-inbox recovery, Git-ref polling recovery, traversal, symlink, OpenClaw
retry, same-blocker limit, per-gate hop limit, and callback contract mismatch.
- JSON parsing, Draft 2020-12 schema validation, OpenAPI 3.1 validation, Bash
syntax, `systemd-analyze verify`, and `git diff --check` passed.
- Current-tree Gitleaks and full current-branch/implementation-range history
scans passed. A separate all-ref repository scan found four pre-existing
findings on unrelated, non-ancestor refs; none belongs to this implementation.
- Root-isolated installer verification preserved existing token contents while
normalizing ownership/mode, and the versioned install completed successfully.
- Root-isolated rollback passed initial rollback, repeat no-op, polling-unit
coordination, and tampered digest fail-closed checks.
- The implementation branch was pushed without force and its worktree, local
bare-ref, and Gitea OIDs are identical.
No secret value was printed or committed. No reset, amend, rebase, force push,
direct main push, controller mutation, or fabricated evidence was used.
@@ -1,156 +0,0 @@
# V2R1 Gate 1 — Clean-Room Final Evidence
## Summary
| Field | Value |
|---|---|
| Date | 2026-07-14 |
| Source commit | `502ef30642597fb0b70b90ae2e8a0b6af217d80e` |
| Source branch | `origin/work/v2r1-integration-quality-2000` |
| Result branch | `fix/v2r1-g1-cleanroom-final-evidence-r2-20260714` |
| Result commit reference | `HEAD` |
| Gate | `G1` |
| Variant | `openclaw-cleanroom` |
| Status | `PASS` |
The immutable report uses `HEAD` for post-commit verification. The resolved commit object ID is recorded by the external acceptance result after this file is committed; a Git commit cannot reliably embed its own object ID because changing the file changes the tree and commit identity.
## Machine-Readable Result
```yaml
gate: G1
variant: openclaw-cleanroom
date: 2026-07-14
status: PASS
source_commit: 502ef30642597fb0b70b90ae2e8a0b6af217d80e
source_branch: origin/work/v2r1-integration-quality-2000
result_branch: fix/v2r1-g1-cleanroom-final-evidence-r2-20260714
result_commit_ref: HEAD
tests_total: 32
tests_passed: 32
tests_failed: 0
cleanup_scan: PASS
secret_scan: PASS
rollback_status: PASS
recovery_verified: true
workspace_clean_at_test_completion: true
merge_performed: false
tag_created: false
baseline_promoted: false
deployment_performed: false
```
## Evidence Provenance
The test, cleanup, secret-scan, rollback, and recovery results below are execution evidence supplied by OpenClaw for the Gate 1 run. This correction commit changes only the evidence report and does not claim that the GitOps API reran the suites.
## HMAC Test-Key Length Verification
| Test file | Variable | Test-only value | Length |
|---|---|---|---:|
| `tests/v2r1/test_runtime_wiring.py:24` | `internal_key` | `b"runtime-internal-context-key-is-32bytes"` | 39 bytes |
| `tests/v2r1/test_runtime_wiring.py:25` | `ingress_key` | `b"runtime-external-ingress-key-is-32bytes"` | 39 bytes |
Both values are test fixtures. The supplied evidence reports that no production secret was introduced.
## Test Results Supplied by OpenClaw
### V2R1 suite — 29 of 29 passed
```shell
PYTHONPATH=active-runtime/app python3 -m pytest \
tests/v2r1/test_hermes_fabric.py \
tests/v2r1/test_message_ledger_append.py \
tests/v2r1/test_router_isolation.py \
tests/v2r1/test_runtime_identity_binding.py \
tests/v2r1/test_runtime_wiring.py \
tests/v2r1/test_tenant_context.py -v
# Reported result: 29 passed, exit code 0
```
### Integration suite — 3 of 3 passed
```shell
PYTHONPATH=active-runtime/app python3 -m pytest tests/integration/test_runtime_ingress_flow.py -v
# Reported result: 3 passed, exit code 0
```
**Reported total: 32 of 32 passed.**
## Cleanup, Security, and Recovery Evidence
| Check | Supplied result |
|---|---|
| Conflict-marker scan | PASS |
| Cleanup scan | PASS |
| Secret scan | PASS |
| Legitimate hardcoded test keys | Two 39-byte fixtures in `test_runtime_wiring.py` |
| Rollback rehearsal | PASS; 13 of 13 core tests reported after rollback to `6077331` |
| Recovery verification | PASS |
## Deployment State
| Operation | Performed |
|---|---|
| Merge | No |
| Tag creation | No |
| Baseline promotion | No |
| Staging deployment | No |
| Production deployment | No |
## Post-Commit Verification
Run from the repository root after the commit is created:
```shell
set -eu
SOURCE=502ef30642597fb0b70b90ae2e8a0b6af217d80e
RESULT_FILE=.agent/results/openclaw/RESULT-V2R1-G1-OPENCLAW-FINAL-EVIDENCE-20260714.md
git rev-parse HEAD
test "$(git diff --name-only "$SOURCE" HEAD | wc -l | tr -d ' ')" = "1"
test "$(git diff --name-only "$SOURCE" HEAD)" = "$RESULT_FILE"
git ls-tree -r HEAD -- "$RESULT_FILE"
python3 - "$RESULT_FILE" <<'PY'
from pathlib import Path
import re
import sys
path = Path(sys.argv[1])
text = path.read_text(encoding="utf-8")
encoded_tokens = [
[84, 66, 68],
[80, 69, 78, 68, 73, 78, 71],
[84, 79, 68, 79],
[70, 73, 88, 77, 69],
[91, 123, 99, 111, 109, 109, 105, 116, 125, 93],
]
tokens = ["".join(chr(value) for value in item) for item in encoded_tokens]
angle_token = re.compile(chr(60) + r"[^>\n]+" + chr(62))
hits = [token for token in tokens if token in text]
if angle_token.search(text):
hits.append("angle-delimited-token")
if hits:
print("TOKEN_SCAN=FAIL", hits)
raise SystemExit(1)
print("TOKEN_SCAN=PASS")
PY
```
## Acceptance Conditions
Gate 1 is eligible to proceed only when the external acceptance record confirms all of the following against the resolved `HEAD` commit:
- the commit exists and has source commit `502ef30642597fb0b70b90ae2e8a0b6af217d80e` as its parent;
- exactly this one report file changed;
- the committed report contains no unresolved legacy token;
- the result tree is not identical to rejected commit `71239b4d187e683e05fd22fc9d5df8ae324e3390`;
- no merge, tag, baseline promotion, or deployment occurred.
@@ -1,15 +0,0 @@
{
"b3": "BLOCKED_EVIDENCE_REQUIRED",
"b4": "NOT_STARTED",
"baseline": "V1R4C6",
"contract_branch": "task/governance/v2r1-personal-weixin-production-contract-20260717",
"contract_commit": "cbe33ecab8e9794ba5f318bea43aeaf447a56fbc",
"dispatch_commit": null,
"production_release": "NOT_STARTED",
"release": "paused",
"repair3": "PASS_CANDIDATE_PREPARED",
"runner": "BLOCKED_GATEWAY_SECRET_REF_UNAVAILABLE",
"schema_version": 1,
"single_state_writer": "openclaw",
"updated_at": "2026-07-17T14:13:38+00:00"
}
@@ -1,69 +0,0 @@
# Codex task: apply and verify AIOS Orchestrator Gateway v1
Contract: `cbe33ecab8e9794ba5f318bea43aeaf447a56fbc`
Use the strongest actually available Codex model for the initial security review.
If unavailable or timed out, record TIMEOUT/NOT_EXECUTED and let OpenClaw run
the deterministic test path. Do not count a timeout as PASS.
## Apply
1. Create a new clean append-only branch and isolated worktree.
2. Validate the delivery tarball and `SHA256SUMS`.
3. Run the external `scripts/apply_gateway_patch.sh` with `SOURCE_DIR` and
`WORKTREE`; do not alter unrelated paths.
4. Review all added code, especially:
- exact contract and optimistic state-version checks;
- event/decision idempotency;
- SQLite leases and retry behavior;
- Workspace Agent `202` asynchronous callback flow;
- Responses background creation and polling;
- file-inbox and Git-ref polling;
- traversal/symlink protections;
- OpenClaw lifecycle synchronization;
- systemd sandbox;
- install and rollback transactions.
## Tests
Run from the final source tree:
- Python compile for all gateway and helper files;
- unit tests;
- JSON schema/config parsing;
- Bash syntax;
- `systemd-analyze verify`;
- event duplicate and payload-conflict tests;
- stale state-version rejection;
- lease/double-claim test;
- Workspace trigger failure and Responses fallback;
- response queued/in-progress/completed polling;
- file-inbox recovery after HTTP failure;
- Git-ref initial baseline and subsequent-change event;
- task start/end and project summary synchronization;
- dispatch traversal and symlink rejection;
- retry/backoff/dead-letter;
- install dry-run;
- rollback test in an isolated fixture;
- `git diff --check`;
- full repository tests;
- final Gitleaks.
## Commit and review
1. Create an append-only implementation commit.
2. Push without force.
3. Confirm `WORKTREE_OID == BARE_OID == GITEA_OID`.
4. Create an independent RESULT-only branch and exact-one result commit.
5. Record the source bundle SHA-256, implementation OID, RESULT OID, tests,
Gitleaks, systemd validation and remaining external configuration blockers.
## Forbidden
No reset, amend, rebase, force push, direct main push, controller mutation,
secret disclosure, fabricated test result, production deployment or B3 evidence
fabrication.
Success:
`GATEWAY_CODE_REVIEW=PASS IMPLEMENTATION=<oid> RESULT=<oid> OID_MATCH=YES`
@@ -1,13 +0,0 @@
# Codex V2R1 adaptive execution
CONTRACT_ACK=cbe33ecab8e9794ba5f318bea43aeaf447a56fbc
Read `.agent/policies/V2R1-PERSONAL-WEIXIN-PRODUCTION-EXECUTION-CONTRACT.yaml`.
Execute P1-POST-CONTRACT-REACK now:
- read-only verify Repair3 e110cda9968cadc5c7b7179ec5003b05aad11ce4
- read-only verify RESULT 49a9c2e0cc898ecf2bbd45f454e007644d7f3045
- verify lineage from 8d9c6da90fc8caa69b691d243c6fefb40b6b0575, exact4, tests, Gitleaks and RESULT-only scope
- do not modify Repair3 code in this unit
Act as fallback for OpenClaw only on timeout/unavailability. Use GPT-5.6 only if actually exposed; otherwise strongest visible model. Prefer OpenClaw when quality is comparable or volume is high; prefer Codex for complex/security-critical work.
Forbidden: reset, amend, rebase, force push, direct main push, controller mutation, secret disclosure, fabricated evidence, skipped gates.
Report:
CONTRACT=cbe33ecab8e9794ba5f318bea43aeaf447a56fbc WORK_UNIT=<id> TRACK=<id> GATE=<id> AGENT=codex STATUS=<status> IMPLEMENTATION=<oid-or-NONE> RESULT=<oid-or-NONE> OID_MATCH=<YES-or-NO> BLOCKER=<reason-or-NONE>
Keep BASELINE=V1R4C6 RELEASE=paused PRODUCTION_RELEASE=NOT_STARTED until production gate passes.
@@ -1,68 +0,0 @@
# OpenClaw task: deploy and supervise AIOS Orchestrator Gateway v1
Contract: `cbe33ecab8e9794ba5f318bea43aeaf447a56fbc`
You are the default orchestrator and deployment supervisor.
## Preconditions
- Codex has applied and independently reviewed this source bundle on a clean,
append-only branch.
- Implementation and RESULT OIDs are identical across worktree, bare repo and
Gitea.
- Final Gitleaks and repository tests are PASS.
- No force push, reset, amend or rebase occurred.
## Responsibilities
1. Validate the source bundle SHA-256 and `SHA256SUMS`.
2. Review the generated systemd service, poll timer, tmpfiles and sysusers files.
3. Install through `scripts/install_aios_orchestrator_gateway.sh`.
4. Configure one or both central-model channels:
- published Workspace Agent API channel with `agtch_...` trigger ID and a
Workspace Agent access token stored outside Git; or
- Responses API fallback with an approved model and API key stored outside Git.
5. Publish the callback endpoint securely and configure the Workspace Agent
action from `workspace-agent/orchestrator-decision-action.openapi.yaml`.
6. Confirm that the Workspace Agent instructions match
`workspace-agent/CENTRAL_AGENT_INSTRUCTIONS.md`.
7. Enable both:
- the continuously running gateway service;
- the independent `aios-orchestrator-gateway-poll.timer`.
8. Verify HTTP event ingestion, file-inbox polling, Git-ref polling,
Workspace Agent trigger acceptance, callback decision, Responses background
polling fallback, dispatch queue generation, retry leases and loop guards.
9. Verify OpenClaw receives and synchronizes:
- TASK_DISPATCHED
- TASK_STARTED
- TASK_ENDED
- PROJECT_SUMMARY
- PROJECT_COMPLETED
10. Run a harmless bootstrap work unit through OpenClaw and Codex and confirm
duplicate event submission is idempotent.
11. Run rollback, reinstall and heartbeat/health verification.
12. Create one RESULT-only review recording exact commits, artifact digest,
tests, systemd security, polling recovery, lifecycle synchronization and
rollback.
## Fail-closed boundaries
- Do not put Workspace Agent tokens, API keys, callback tokens or gateway
credentials in Git, logs, command arguments or RESULT files.
- Do not claim the gateway resolves the existing B3 credential/raw-wire blocker.
- Do not advance B4 or production merely because this gateway is healthy.
- Do not bypass owner/admin production release approvals.
- Do not use reset, amend, rebase, force push, direct main push or bare-ref edits.
## Required final status
Success:
`ORCHESTRATOR_GATEWAY_LIVE=PASS POLLING=PASS OPENCLAW_SYNC=PASS ROLLBACK=PASS`
Blocker:
`ORCHESTRATOR_GATEWAY_LIVE=BLOCKED reason=<stable_reason>`
Keep `BASELINE=V1R4C6 RELEASE=paused PRODUCTION_RELEASE=NOT_STARTED` until the
existing production contract advances all release gates.
@@ -1,13 +0,0 @@
# OpenClaw V2R1 adaptive orchestration
CONTRACT_ACK=cbe33ecab8e9794ba5f318bea43aeaf447a56fbc
Read `.agent/policies/V2R1-PERSONAL-WEIXIN-PRODUCTION-EXECUTION-CONTRACT.yaml`.
You are default orchestrator and sole authoritative state writer.
Execute immediately:
1. R0-DISCOVER-SECRET-PROVIDER: discover approved provider metadata and owner-probe source without reading or outputting secrets. Environment variables alone are not approved secret refs.
2. P2-INVENTORY-REAL-EVIDENCE: inventory approved restricted B3 evidence locations; validate existing facts; never synthesize evidence.
3. Independently verify Codex results before advancing.
Prefer OpenClaw for comparable-quality, large, repetitive, long-running, infrastructure and cost-sensitive work. Prefer Codex strongest actually available model for complex code, security boundaries, architecture and high-risk review. On timeout mark TIMEOUT and switch agent; never infer PASS.
Forbidden: reset, amend, rebase, force push, direct main push, controller mutation, secret disclosure, fabricated evidence, skipped gates.
Report:
CONTRACT=cbe33ecab8e9794ba5f318bea43aeaf447a56fbc WORK_UNIT=<id> TRACK=<id> GATE=<id> AGENT=openclaw STATUS=<status> COMMIT=<oid-or-NONE> BLOCKER=<reason-or-NONE>
Keep BASELINE=V1R4C6 RELEASE=paused PRODUCTION_RELEASE=NOT_STARTED until production gate passes.
-107
View File
@@ -1,107 +0,0 @@
# AIOS Orchestrator Gateway v0.2
This component turns the current passive GPT orchestration pattern into a
durable, unattended loop:
```text
Gitea/OpenClaw/Codex event
-> HTTP event endpoint or polled file inbox
-> durable SQLite state machine
-> Workspace Agent API trigger
-> strict callback decision
-> Responses API background fallback and polling
-> OpenClaw/Codex dispatch queues
-> start/end/result events
-> next orchestration cycle
```
## Reliability mechanisms
The gateway does not depend on one timer, webhook or model call:
- HTTP event ingestion.
- Periodic file-inbox polling for missed webhooks and offline producers.
- Local bare-Git ref polling for `main`, governance, patch and result refs.
- Workspace Agent retries with a stable event `Idempotency-Key`.
- Workspace Agent callback timeout and Responses API background fallback.
- Responses status polling until completion or fail-closed terminal status.
- SQLite optimistic state versions, idempotency records and processing leases.
- Exponential retry with a maximum retry count and dead-letter state.
- Same-blocker and maximum-hop guards to stop non-progress loops.
- A systemd timer runs `--poll-once` as an independent reliability watchdog.
Workspace Agent trigger runs are asynchronous and do not expose a retrievable
final response. The central Workspace Agent must therefore call the
`submit_orchestration_decision` action.
## OpenClaw synchronization
Every lifecycle stage is durably written to the OpenClaw synchronization queue:
- `TASK_DISPATCHED`
- `TASK_STARTED`
- `TASK_ENDED`
- `DECISION_APPLIED`
- `PROJECT_SUMMARY`
- `PROJECT_COMPLETED`
An optional authenticated OpenClaw HTTP endpoint can receive the same records.
A failed HTTP delivery remains in the lifecycle retry queue. OpenClaw remains
the default project-status synchronizer and authoritative progress presenter.
## Agent execution contract
Each dispatched JSON envelope contains:
- exact contract commit;
- source event;
- clean base commit;
- primary and fallback agent;
- allowed paths;
- required checks;
- forbidden operations;
- completion event callback format.
OpenClaw and Codex must send a `work_unit_started` event before execution and a
`work_unit_completed`, `work_unit_blocked`, or `work_unit_failed` event when
they stop. This guarantees that OpenClaw can synchronize every task start,
finish, and overall project summary.
## Security
- Model and callback credentials are read only from root-owned secret files.
- Credentials never enter Git, dispatch payloads or logs.
- The gateway runs as a dedicated unprivileged user.
- Dispatch and sync paths are protected against traversal and symlink targets.
- All state changes require the exact contract commit and current state version.
- Production evidence, credentials and approvals stay fail-closed.
- Git history operations remain controlled by the committed governance contract.
## Deployment sequence
1. Apply this source bundle to a clean append-only branch.
2. Run unit, repository, shell, JSON, systemd and Gitleaks checks.
3. Configure one or both model channels:
- published Workspace Agent API channel and Workspace Agent access token;
- Responses API key and approved fallback model.
4. Publish the decision callback as a Workspace Agent action or MCP tool.
5. Install the service through `scripts/install_aios_orchestrator_gateway.sh`.
6. Run `scripts/verify_aios_orchestrator_gateway.sh`.
7. Submit a harmless event and verify:
- trigger acceptance;
- strict decision callback;
- dispatch file;
- OpenClaw task-start/task-end/project-summary synchronization;
- duplicate idempotency;
- polling recovery after suppressing the HTTP webhook.
The installer copies an explicit gateway-only allowlist into a release directory
named by its SHA-256 digest, atomically updates `/opt/aios-orchestrator-gateway/current`,
and persists `/var/lib/aios-orchestrator-gateway/install-receipt.json` with the
current and previous release. `--dry-run` performs source validation and emits
`AIOS_ORCHESTRATOR_INSTALL_DRY_RUN=PASS` without changing installed state.
Rollback reads that root-owned `0600` receipt, verifies both release directory
names and `SOURCE_DIGEST` files, coordinates the gateway and poll units, and
atomically switches `current` to the previous release. Repeating the same
rollback is a no-op and emits `NOOP_ALREADY_ROLLED_BACK`.
+1 -1
View File
@@ -1 +1 @@
V1R4C6
V1R4C3
+1
View File
@@ -0,0 +1 @@
/data/aios-gitops/workspace/active-runtime
+1
View File
@@ -0,0 +1 @@
{"ts": 1783642009.9384289, "name": "another_cmd.json"}
+1
View File
@@ -0,0 +1 @@
{"ts": 1783642009.9384289, "name": "stuck_cmd.json"}
@@ -0,0 +1,19 @@
# CMD-20260710-sr01-gitea-branch-sync
## Objective
Fix Gitea DB branch index desync: Gitea DB 与 bare repo 分支列表不一致(Gitea API 返回 50 条 vs bare repo 55 条)。
## Analysis
- Root cause: `h_branch_sync()` 之前依赖 Gitea API `POST /api/v1/repos/aios/aios/branches` 分页查询
- Token scope 不足 `read:admin` 导致只能获取 50 条(默认 limit),但 total 是 55
- 临时修复: 改为 `git ls-remote --heads` 直接枚举 bare repo,绕过了 Gitea API 分页问题
- 但根本问题:Gitea DB 索引没有完全同步 bare repo,需要调查 Gitea 后台同步机制
## Plan
1. 诊断 Gitea DB 与 bare repo 实际的差异详情
2. 决定修复方案:full resync Gitea, or fix the sync mechanism
3. 实现/验证
4. 更新 baseline
## Status
pending
+1
View File
@@ -0,0 +1 @@
{"ts": 1783642009.9169936, "name": "cmd1.json"}
+1
View File
@@ -0,0 +1 @@
{"ts": 1783642009.9169936, "name": "cmd2.json"}
+1
View File
@@ -0,0 +1 @@
{"ts": 1783643569.9295633, "name": "recent"}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783583895",
"title": "⚠️ Issue Detected: stuck",
"body": "1 commands stuck in running/ for >30m",
"urgency": "warning",
"ts": "2026-07-09T15:58:15+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783583993",
"title": "⚠️ Issue Detected: stuck",
"body": "1 commands stuck in running/ for >30m",
"urgency": "warning",
"ts": "2026-07-09T15:59:53+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783584042",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T16:00:42+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783597695",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T19:48:15+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783597737",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T19:48:57+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783598337",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T19:58:57+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783598938",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T20:08:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783599538",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T20:18:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783600138",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T20:28:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783600738",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T20:38:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783601338",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T20:48:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783601938",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T20:58:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783602538",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T21:08:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783603138",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T21:18:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783603738",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T21:28:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783604338",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T21:38:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783604938",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T21:48:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783605538",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T21:58:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783606138",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T22:08:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783606738",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T22:18:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783607338",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T22:28:58+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783607939",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T22:38:59+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783608539",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T22:48:59+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783609139",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T22:58:59+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783609739",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T23:08:59+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783610339",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T23:18:59+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783610939",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T23:28:59+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783611539",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T23:38:59+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783612139",
"title": "⚠️ Issue Detected: branch_sync",
"body": "5 branches missing from Gitea DB",
"urgency": "warning",
"ts": "2026-07-09T23:48:59+0800"
}
+7
View File
@@ -0,0 +1,7 @@
{
"nid": "n-1783643869",
"title": "Stuck Commands Cleaned",
"body": "Moved 2 stuck commands to failed/",
"urgency": "info",
"ts": "2026-07-10T08:37:49+0800"
}
+1
View File
@@ -0,0 +1 @@
{"check": "stuck", "severity": "medium", "diagnosis": "stuck commands", "stuck": [{"n": "stuck_cmd.json", "ts": 1783642009.9384289}, {"n": "another_cmd.json", "ts": 1783642009.9384289}], "fix": "move_to_failed"}
+1
View File
@@ -0,0 +1 @@
{"check": "branch_sync", "severity": "high", "diagnosis": "missing branches", "branches": ["br1"], "fix": "sync_branches"}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783584042",
"created": "2026-07-09T16:00:42+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/group-owner-agent-context-isolation",
"patch/agent-gpt-message-plane",
"patch/agent-event-bus-unified",
"patch/user-profile-isolation",
"patch/gitops-change-archive-audit"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783597695",
"created": "2026-07-09T19:48:15+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/gitops-change-archive-audit",
"patch/agent-gpt-message-plane",
"patch/agent-event-bus-unified",
"patch/user-profile-isolation",
"patch/group-owner-agent-context-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783597737",
"created": "2026-07-09T19:48:57+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783598337",
"created": "2026-07-09T19:58:57+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783598938",
"created": "2026-07-09T20:08:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783599538",
"created": "2026-07-09T20:18:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783600138",
"created": "2026-07-09T20:28:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783600738",
"created": "2026-07-09T20:38:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783601338",
"created": "2026-07-09T20:48:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783601938",
"created": "2026-07-09T20:58:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783602538",
"created": "2026-07-09T21:08:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783603138",
"created": "2026-07-09T21:18:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783603738",
"created": "2026-07-09T21:28:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783604338",
"created": "2026-07-09T21:38:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783604938",
"created": "2026-07-09T21:48:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783605538",
"created": "2026-07-09T21:58:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783606138",
"created": "2026-07-09T22:08:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783606738",
"created": "2026-07-09T22:18:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783607338",
"created": "2026-07-09T22:28:58+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783607939",
"created": "2026-07-09T22:38:59+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783608539",
"created": "2026-07-09T22:48:59+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783609139",
"created": "2026-07-09T22:58:59+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783609739",
"created": "2026-07-09T23:08:59+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783610339",
"created": "2026-07-09T23:18:59+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783610939",
"created": "2026-07-09T23:28:59+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783611539",
"created": "2026-07-09T23:38:59+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,16 @@
{
"patch_id": "patch-1783612139",
"created": "2026-07-09T23:48:59+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "5 branches missing from Gitea DB",
"branches": [
"patch/agent-event-bus-unified",
"patch/agent-gpt-message-plane",
"patch/group-owner-agent-context-isolation",
"patch/gitops-change-archive-audit",
"patch/user-profile-isolation"
],
"stuck": [],
"fix": "sync_branches"
}
@@ -0,0 +1,13 @@
{
"patch_id": "patch-1783643869",
"created": "2026-07-10T08:37:49+0800",
"check": "branch_sync",
"severity": "high",
"diagnosis": "2 branches missing from Gitea DB",
"branches": [
"br1",
"br2"
],
"stuck": [],
"fix": "sync_branches"
}
+1
View File
@@ -0,0 +1 @@
this is not json
+15 -10
View File
@@ -76,20 +76,25 @@ def h_api():
except Exception as e: return {"ok": False, "err": str(e)}
def h_branch_sync():
bare = Path("/data/aios-gitops/runtime/gitea-bin/data/repositories/aios/aios-v23.git")
bare = Path("/data/aios-gitops/runtime/gitea-bin/data/repositories/aios/aios.git")
try:
# Use git command directly instead of Gitea API to avoid auth/permission issues
r = subprocess.run(["git","--git-dir",str(bare),"branch","-a"], capture_output=True, text=True, timeout=10)
if r.returncode != 0: return {"ok": False, "err": r.stderr[:200]}
bb = set(l.strip().replace("remotes/origin/","").replace("* ","") for l in r.stdout.strip().split("\n") if l.strip())
gb = []; pg = 1
while True:
r2 = requests.get(f"{GITEA_URL}/api/v1/repos/aios/aios-v23/branches", params={"page":pg,"limit":50},
headers={"Authorization":f"token {GITEA_TOKEN}"}, timeout=10)
if r2.status_code != 200: break
d = r2.json()
if not d: break
gb.extend(b["name"] for b in d); pg += 1
gs = set(gb); miss = bb - gs
# Use git ls-remote to get remote branches instead of Gitea API
r2 = subprocess.run(["git","ls-remote","--heads",GITEA_URL.split("//")[0]+"//"+GITEA_TOKEN+"@"+GITEA_URL.split("//")[1]+"/aios/aios.git"],
capture_output=True, text=True, timeout=15)
if r2.returncode != 0: return {"ok": False, "bare": len(bb), "gitea": 0, "err": "ls-remote failed: "+r2.stderr[:200]}
gb = []
for line in r2.stdout.strip().split("\n"):
if line.strip():
parts = line.strip().split(None, 1)
if len(parts) == 2:
ref = parts[1].replace("refs/heads/","")
gb.append(ref)
gs = set(gb)
miss = bb - gs
return {"ok": len(miss)==0, "bare": len(bb), "gitea": len(gs), "missing": list(miss)[:10]}
except Exception as e: return {"ok": False, "err": str(e)}
+11 -10
View File
@@ -1,11 +1,12 @@
{
"ts": "2026-07-09T00:00:00+09:00",
"ok": true,
"checks": {
"git_object_permission": true,
"api": true,
"branch_sync": true,
"stale_runtime_state_cleaned": true
},
"note": "Updated during PR #2 cleanup before merge"
}
"ts": "2026-07-11T02:23:29+0800",
"ok": false,
"checks": {
"gitea": false,
"api": true,
"branch_sync": true,
"stuck": true
},
"plans": 0,
"applied": 0
}
+1 -1
View File
@@ -11,5 +11,5 @@
"discovered_at": "2026-07-08T19:01:45+0800"
}
},
"last_scan": "2026-07-09T10:42:52+0800"
"last_scan": "2026-07-11T02:28:28+0800"
}
+15
View File
@@ -0,0 +1,15 @@
{
"run_id": "c-1783583895",
"check": "stuck",
"status": "degraded",
"ts": "2026-07-09T15:58:15+0800",
"details": {
"ok": false,
"stuck": [
{
"n": "CMD-20260709-enable-autonomous-controller.md",
"age": 292.9
}
]
}
}
+15
View File
@@ -0,0 +1,15 @@
{
"run_id": "c-1783583993",
"check": "stuck",
"status": "degraded",
"ts": "2026-07-09T15:59:53+0800",
"details": {
"ok": false,
"stuck": [
{
"n": "CMD-20260709-enable-autonomous-controller.md",
"age": 294.6
}
]
}
}
+15
View File
@@ -0,0 +1,15 @@
{
"run_id": "c-1783584042",
"check": "stuck",
"status": "degraded",
"ts": "2026-07-09T16:00:42+0800",
"details": {
"ok": false,
"stuck": [
{
"n": "CMD-20260709-enable-autonomous-controller.md",
"age": 295.4
}
]
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"run_id": "c-1783597602",
"check": "stuck",
"status": "ok",
"ts": "2026-07-09T19:46:42+0800",
"details": {
"ok": true,
"stuck": []
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"run_id": "c-1783597695",
"check": "stuck",
"status": "ok",
"ts": "2026-07-09T19:48:15+0800",
"details": {
"ok": true,
"stuck": []
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"run_id": "c-1783597737",
"check": "stuck",
"status": "ok",
"ts": "2026-07-09T19:48:57+0800",
"details": {
"ok": true,
"stuck": []
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"run_id": "c-1783598337",
"check": "stuck",
"status": "ok",
"ts": "2026-07-09T19:58:57+0800",
"details": {
"ok": true,
"stuck": []
}
}
+11
View File
@@ -0,0 +1,11 @@
{
"run_id": "c-1783598937",
"check": "api",
"status": "ok",
"ts": "2026-07-09T20:08:57+0800",
"details": {
"ok": true,
"baseline": "V1R4C3",
"versions": 13
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"run_id": "c-1783598938",
"check": "stuck",
"status": "ok",
"ts": "2026-07-09T20:08:58+0800",
"details": {
"ok": true,
"stuck": []
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"run_id": "c-1783599538",
"check": "stuck",
"status": "ok",
"ts": "2026-07-09T20:18:58+0800",
"details": {
"ok": true,
"stuck": []
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"run_id": "c-1783600138",
"check": "stuck",
"status": "ok",
"ts": "2026-07-09T20:28:58+0800",
"details": {
"ok": true,
"stuck": []
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"run_id": "c-1783600738",
"check": "stuck",
"status": "ok",
"ts": "2026-07-09T20:38:58+0800",
"details": {
"ok": true,
"stuck": []
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"run_id": "c-1783601338",
"check": "stuck",
"status": "ok",
"ts": "2026-07-09T20:48:58+0800",
"details": {
"ok": true,
"stuck": []
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"run_id": "c-1783601938",
"check": "stuck",
"status": "ok",
"ts": "2026-07-09T20:58:58+0800",
"details": {
"ok": true,
"stuck": []
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"run_id": "c-1783602538",
"check": "stuck",
"status": "ok",
"ts": "2026-07-09T21:08:58+0800",
"details": {
"ok": true,
"stuck": []
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"run_id": "c-1783603138",
"check": "stuck",
"status": "ok",
"ts": "2026-07-09T21:18:58+0800",
"details": {
"ok": true,
"stuck": []
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"run_id": "c-1783603738",
"check": "stuck",
"status": "ok",
"ts": "2026-07-09T21:28:58+0800",
"details": {
"ok": true,
"stuck": []
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"run_id": "c-1783604338",
"check": "stuck",
"status": "ok",
"ts": "2026-07-09T21:38:58+0800",
"details": {
"ok": true,
"stuck": []
}
}

Some files were not shown because too many files have changed in this diff Show More