Normalize Glas execution evidence
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a028de-e2c8-7732-8521-46a7fc5db82f
This commit is contained in:
parent
b933cf52c8
commit
7e81545b24
13 changed files with 528 additions and 33 deletions
|
|
@ -67,6 +67,33 @@ workplan task file. Not an issue-core or Forgejo ticket.
|
|||
{ "result": { "path": "briefs/…", "ok": true }, "worker_id": "…" }
|
||||
```
|
||||
|
||||
Glas consumers submit its `GatewayResult` directly. Activity Core stores the
|
||||
safe evidence envelope and drops direct-caller output:
|
||||
|
||||
```json
|
||||
{
|
||||
"worker_id": "glas-worker@railiance01",
|
||||
"result": {
|
||||
"ok": true,
|
||||
"evidence": {
|
||||
"request_id": "…",
|
||||
"contract_version": "1.0",
|
||||
"profile_ref": "harness.agent-dev@1.0.0",
|
||||
"rein_id": "rein-aharness",
|
||||
"rein_version": "0.1.0",
|
||||
"resolved_model": "claude-sonnet-4-6",
|
||||
"sandbox_profile": "profile.bwrap-local",
|
||||
"outcome": "succeeded",
|
||||
"duration_s": 12.4,
|
||||
"tokens_spent": 321,
|
||||
"tool_events_count": 0,
|
||||
"tool_events_completeness": "unavailable"
|
||||
},
|
||||
"tool_output": "dropped before persistence"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
{ "error": "llm timeout", "worker_id": "…", "reopen": false }
|
||||
```
|
||||
|
|
@ -74,6 +101,15 @@ workplan task file. Not an issue-core or Forgejo ticket.
|
|||
If `reopen: true` and `attempt < max_attempts` (env `OPS_RUN_MAX_ATTEMPTS`, default 3),
|
||||
state returns to `open`; else `failed`.
|
||||
|
||||
Both completion and failure normalize through the same allowlist. The persisted
|
||||
key is `result.execution_evidence`; it contains the Glas 1.0 constellation,
|
||||
outcome, bounded measurements, commit/artifact references, and allowlisted
|
||||
organizational refs. Zero stays zero and unsupported event visibility stays
|
||||
`unavailable`; absent measurements remain absent. `tool_output`, `tool_error`,
|
||||
prompts, messages, provider responses, credential fields, unknown nested blobs,
|
||||
and undeclared refs are never stored. Read projections normalize historic rows
|
||||
again before returning them.
|
||||
|
||||
## Emit path
|
||||
|
||||
On `emit_tasks` (when `OPS_RUN_QUEUE_ENABLED` is truthy, **default true**):
|
||||
|
|
@ -100,13 +136,16 @@ Never requires Forgejo or issue-core for the claim path.
|
|||
| ----- | ------ |
|
||||
| `ops_runs[]` | matched by `triggering_event_id == run_id` (or contains), else time window |
|
||||
| `artifacts[]` | from `ops_runs.result` (`path`, `head_after`, `target_repo`) |
|
||||
| `ops_runs[].execution_evidence` | compact Glas profile/rein/model/sandbox/outcome evidence |
|
||||
| Forgejo URL | `FORGEJO_WEB_BASE` (default `https://forgejo.coulomb.social`) + org + repo + path + ref |
|
||||
|
||||
Run detail: `GET /ops/automations/{id}/runs/{run_id}` and
|
||||
`/ops/ui/automations/{id}/runs/{run_id}`.
|
||||
|
||||
Executor `result` should include at least: `ok`, `path`, `head_after`,
|
||||
`target_repo`, `committed`. No prompts or raw model output.
|
||||
`target_repo`, `committed`. A Glas-backed executor should submit its full
|
||||
`GatewayResult`; Activity Core extracts the safe envelope. No prompts or raw
|
||||
model output are persisted or returned.
|
||||
|
||||
## Auth
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue