oc_chat
Loading...
Searching...
No Matches
oc_chat.registry.cli.sync Namespace Reference

Functions

None add_sync_subcommand (argparse._SubParsersAction subcommands)
int _cmd_sync (argparse.Namespace args)
str format_sync_report (Mapping[str, object] report)
None _audit_sync (Registry registry, str actor_slot, Mapping[str, object] report)
None _reimport_kept_plan_statuses (Registry registry, str actor_slot, tuple[RenderResult,...] results)

Variables

str LOCK_NAME = "legacy-compat-write"

Detailed Description

Operator CLI for registry artifact rendering.

Purpose
-------
Expose `python -m oc_chat.registry sync` for re-rendering registry-backed
filesystem artifacts.

Responsibilities
----------------
- Resolve the registry and workspace root through standard discovery.
- Acquire the compatibility write lock while rendering artifacts.
- Emit one `sync.run` audit operation through the registry seam.

Diagnostics
-----------
Domain: OC_CHAT.MAIN
Levels:
    L2 - sync command lifecycle events
    L3 - artifact action summaries
    L4 - argparse/dispatch tracing

Contracts
---------
- All registry mutations go through `Registry.execute_domain_command`.
- Drift warnings are reported to stderr before human output.

Dependencies
------------
- oc_diagnostics (structured debug logging via _dbg)
- oc_chat.registry.discovery (path resolution)
- oc_chat.registry.render (artifact renderer)
- oc_chat.registry (Registry seam for the write lock and the sync.run audit)
- oc_chat.registry.backends.sqlite (SQLiteBackend over the discovered registry path)
- oc_chat.registry.domain (plan_reimport for kept local plan-status files)
- oc_chat.registry.render._common (RenderResult and plan_for_worktree lookup)

Function Documentation

◆ _audit_sync()

None oc_chat.registry.cli.sync._audit_sync ( Registry registry,
str actor_slot,
Mapping[str, object] report )
protected

Definition at line 165 of file sync.py.

Here is the caller graph for this function:

◆ _cmd_sync()

int oc_chat.registry.cli.sync._cmd_sync ( argparse.Namespace args)
protected

Definition at line 100 of file sync.py.

Here is the call graph for this function:

◆ _reimport_kept_plan_statuses()

None oc_chat.registry.cli.sync._reimport_kept_plan_statuses ( Registry registry,
str actor_slot,
tuple[RenderResult, ...] results )
protected

Definition at line 182 of file sync.py.

Here is the caller graph for this function:

◆ add_sync_subcommand()

None oc_chat.registry.cli.sync.add_sync_subcommand ( argparse._SubParsersAction subcommands)
Attach the ``sync`` subcommand.

Definition at line 67 of file sync.py.

◆ format_sync_report()

str oc_chat.registry.cli.sync.format_sync_report ( Mapping[str, object] report)
Return compact human output for sync results.

Definition at line 147 of file sync.py.

Here is the caller graph for this function:

Variable Documentation

◆ LOCK_NAME

str oc_chat.registry.cli.sync.LOCK_NAME = "legacy-compat-write"

Definition at line 64 of file sync.py.