opschain governance activity import
Included from Basic tier
opschain governance activity import <file> [--dry-run]
Lands a local home's governed-activity export on the server
(GovernanceService.ImportGovernedActivity), so the break-glass records
written in the local lane reach the server's reviewers. The file is the
NDJSON the local lane's export wrote (opschain governance activity --local, opschain docs cli/governance-activity); every line of it names
the home it came from (home_id). A server's own export
names no home and is refused, as is a file mixing two homes.
What each line does:
- A break-glass record lands as a record you recorded:
recorded_byis your principal id, the act window and the time the home recorded it are kept, and it isunreconcileduntil a reviewer on the server closes it — a record the home closed lands open, its local closure kept in the statement. Alocal_importstatement names the home, the local record and the home's run, change record and closure. The home's runs and change records are not the server's, so the record is correlated only by its external change reference, if it has one, and is otherwise flagged uncorrelated. File evidence stays in the home: each file item becomes a statement naming its media type, size and digest. It writessecurity:breakglass:recordedwithsource: local_import, the home and the local record's id. - A run's external references attach to the run of the same id on the
server, when there is one and you may record break-glass changes on its
node — writing
audit:steps:external_referenceswithsource: local_import; any other run is skipped. - An attested step is skipped: it stays on its run in the home.
Each local record lands once per home: importing the same file again
reports already_imported and lands nothing. You need read on each
record's node and update on its <node>/breakglass path, the same rights
opschain breakglass record needs; a record on a node you may not record
on is reported not_found and the other lines still land. Agents,
service accounts and step credentials are refused by name. Each call is
audited as audit:governance:activity_imported with its counts; the CLI
sends the file in calls of at most 100 lines, so a large file writes one
audit event per call.
The local lane refuses the verb by name — the import lands on a server.
Flags
| Flag | Meaning |
|---|---|
--dry-run | Report what would land, writing nothing and auditing nothing. |
Output
One row per line — the line number, kind, id, outcome (imported,
already_imported, attached, already_attached, skipped,
not_found, invalid), the record's id on the server and why a line did
not land — then the counts. -o json prints the same as one document.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Every line landed, was already there, or was skipped. |
| 1 | A line was not_found or invalid, the file is not a local home's export, the server refused or is unreachable, or the command ran in the local lane. |
| 2 | Usage error — no file named. |
Examples
opschain governance activity import home.ndjson
LINE KIND ID OUTCOME RECORD DETAIL
1 run 01a1e7c3-…-example skipped - run 01a1e7c3-…-example is not on this server
2 breakglass 01a1e7d0-…-example imported 01a1e7d0-…-server
imported 1 break-glass records (0 already imported), 0 external references; skipped 1, not found 0, invalid 0