Skip to content

AOCI-CODE v0.2.0-rc10

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 03 Dec 17:38
· 28 commits to main since this release

AOCI-CODE v0.2.0-rc10 is built from 326dadbf41e382b5c8d60ea3a0c846f402612b78.

The tenth 0.2.0 candidate answers nine upstream reports from a production
repository running rc4 (#235 to #243). Every fix here was reproduced on rc9
first. The largest is crash recovery: a write killed mid-exchange could leave
AOCI's own staging files in the repository, where the next Maintain read them
as sources; recovery now settles them and the inventory never lists them. The
Overview no longer turns a rejected continuation cursor into a lasting
capacity stop, concurrent write conflicts tell the caller to call Maintain
again instead of resubmitting, unevaluated Code drift is marked as such, and
aoci doctor checks the host binary binding and the AGENTS.md block.

  • A compaction reload whose Host session had a continuation request without a
    new refresh declaration (non-empty cursor, not check_only,
    refresh_reasons absent) rejected by the server for a cursor or snapshot
    fault (overview_cursor_chain_mismatch, overview_cursor_invalid,
    overview_snapshot_changed, overview_session_unavailable_restart_required,
    overview_cursor_out_of_order, or overview_chunk_tokens_changed) while
    that attempt was open — with no subsequent chunk of that attempt served
    afterward — is now exempt from setting or strengthening the Host capacity
    verdict at most once per Host session between proven full-scope completions
    (#236). Serving a subsequent chunk of the open attempt clears its fault mark
    so a later interruption is treated as a capacity signal. The first damaged
    interruption records overview_delivery_interrupted with the rejection
    reason instead of host_context_capacity_exceeded, marks that Host
    session's in-memory exemption spent, and lets the new reload deliver
    normally; until reset by a proven complete full-scope delivery (Host
    confirmation or passing attestation on the open attempt, or a confirmed
    complete full-scope delivery without an open attempt) at least as large as
    any active capacity verdict, any later interrupted reload for that Host
    session sets or strengthens the capacity verdict regardless of continuation
    faults (recording result=host_context_capacity_exceeded with the rejection
    reason in fallback_reason), so a Host session exempts at most one damaged
    reload between proven full-scope completions before reaching capacity_stop.
    Failed or partial attestations without Host confirmation close an open
    attempt without resetting the exemption, confirmed smaller scopes never reset
    it, requests from another Host session never mark an attempt, and one Host
    session's spent exemption does not affect another.
  • Overview Ledger diagnostics now record overview_continuation_rejected
    (fail_code, index_sha256, and when the delivery is identified
    delivery_chain_id, chunk_index as the number of chunks already served
    for that delivery, chunk_count, and a path-free fallback_reason change
    category for overview_snapshot_changed; when the delivery cannot be
    identified, at least fail_code and the current index_sha256, with
    live-path snapshot rejections also carrying the change category in
    fallback_reason — never cursor bytes, file paths, or bodies) when a
    continuation request is rejected, and overview_capacity_stop now starts its
    result with capacity_stop followed by the triggering
    failed_estimated_tokens threshold and interruption counts (previously the
    bare capacity_stop token) without bumping Ledger schema v9 (#235).
  • Single-response non-empty incremental Overview deliveries
    (delivery_mode=delta) now report full_text_included: false to match
    empty delta responses, since only changed and added objects are sent (#243).
  • Concurrent write conflicts and index lock timeouts (#241): stale-plan,
    receipt, and preimage conflicts (code_candidate_plan_stale,
    code_candidate_volume_preimage_stale, code_candidate_receipt_stale,
    database_candidate_volume_stale, database_candidate_volume_preimage_stale,
    database_candidate_receipt_stale),
    candidate source changes between Maintain and Update, and normal lock
    timeouts now guide aoci_update_entry (including root_overview) callers to
    wait briefly and call no-argument aoci_maintain rather than resubmitting a
    stale batch, while formal-asset restoration blockers keep
    restore_formal_assets_from_one_commit consistent across next_action and
    findings[].safe_repair_action. When aoci_maintain itself times out
    waiting for the index lock, it returns an MCP tool error (isError=true)
    prefixed with [write_conflict] and Next step: guidance. Lock reclaim
    rules and the lock file format are unchanged; lock timeout diagnostics
    distinguish a PID not running in this process's view (exited or in another
    container/PID namespace, with estimated remaining seconds until stale
    reclaim), a PID-reused dead holder, a verified long-held live holder
    (advising termination only when recorded process identity matches), an
    unverified long-held holder (advising .aoci/lock inspection), and a
    directory lock that cannot auto-reclaim (returning conservative .aoci/lock
    inspection guidance on both MCP and CLI rather than looping). On the CLI,
    scan (including scan --force) classifies lock timeouts as
    error_code=index_lock_timeout (keeping exit code 10); config set locale,
    index relocate, update-entry, remove-entry, and init keep their
    existing exit codes and error_code values, render localized holder
    diagnostics, and advise retrying the CLI command on
    update-entry/remove-entry; scope acknowledge and scope activate
    continue to return managed_scope_lock_failed.
  • observe_review actor contract (#239): MCP JSON Schema on aoci_maintain
    and aoci_update_entry enforces the AuditActor format
    (^[A-Za-z0-9][A-Za-z0-9._@-]{1,127}$, 2–128 ASCII characters, for example
    codex-agent) via pattern, minLength, and maxLength, and tool
    descriptions declare the rule. Leading or trailing whitespace in
    reviewed_by (for example " ab" or "ab\n") is now rejected at the MCP
    schema boundary before the handler runs. aoci_rules is unchanged, and CLI
    scope acknowledge and scope activate continue accepting flexible human
    --reviewed-by names.
  • Blocked code-drift reporting (#240): shared governance facts and every
    surface projecting them (verify, check, status, scope status,
    index agent guide, aoci_maintain, and engine.Repository.Governance)
    now carry code_drift_status (evaluated, not_evaluated_due_to_blocker,
    or not_applicable) and code_drift_status_reason (scope_change_required,
    managed_scope_invalid, or code_drift_unavailable, unified across all
    surfaces while scope status keeps its finer-grained stage), omitting both
    fields when no active Baseline exists, and human
    verify, status, and Guide outputs print an explicit caveat when code drift
    was not evaluated. Pending Observe review (observed_pending) does not
    block Code drift evaluation and continues to report
    code_drift_status=evaluated.
  • Read-only integration drift checks in aoci doctor (#242): on Volumes v1
    repositories, doctor warns when a configured aoci/aoci.exe host MCP
    command differs from the running binary (ignoring wrapper commands such as
    wsl.exe and never executing configured commands), emits a dedicated warning
    for bare or relative commands that depend on PATH, skips symlinked or
    non-regular host configuration files with remediation guidance (without also
    reporting them as unconfigured), checks AGENTS.md managed-block drift and
    diagnoses a missing <!-- aoci:end --> closing marker (leaving aoci init
    non-destructive so bytes outside a complete marker pair are never deleted),
    and flags legacy root-level AGENTS.md.backup.* files. doctor also checks
    desired Managed Scope policy and cognition budget identities against the
    active Baseline without walking the tree (pointing to the running binary's
    quoted verify command and distinguishing budget-only drift from policy
    identity drift), escapes terminal control and Unicode bidirectional control
    characters in human-readable diagnostics while keeping raw quoted paths in
    remediation commands.
  • A hard kill (SIGKILL or power loss) while aoci_update_entry staged a
    governed write could leave .aoci-tmp-<digits> files in the repository root
    that aoci_maintain and aoci verify subsequently reported as missing and
    unbaselined source files. AtomicWriteCAS now binds its staging filenames to
    the target (.aoci-tmp-<12hex>-<digits>) and recovery removes content-proven
    staging leftovers (empty file, strict target-matching CAS intent JSON, or
    digest matching a pending intent's new_sha256) on a best-effort basis via a
    once-per-target per-process sweep on recovery (including delete-only entry in
    AtomicWriteCAS) so steady-state writes perform no directory listing. Safe
    Inventory now hard-excludes AOCI's exact lowercase reserved
    atomic staging and CAS exchange filenames at any depth
    (.aoci-tmp-<digits>[.bak], .aoci-tmp-<12hex>-<digits>[.bak],
    .aoci-create-<digits>, <name>.aoci-cas.intent, <name>.aoci-cas.swap,
    <name>.aoci-cas.swap.capture, and <name>.aoci-cas.swap.exchange-backup,
    leaving <name>.aoci-cas-conflict.* visible) without moving existing
    repositories' scope identity. After upgrading, any repository that already
    authored an Entry for one of these reserved names (such as an older binary's
    crash leftover or a tracked file of that exact shape) will surface it once as
    an Orphan for normal batch removal (remove_orphans_in_update_batch), which
    also clears its index-role Baseline record. Deleting a managed file, removing
    its Entry, and later recreating the same path with identical bytes now
    surfaces as both missing and unbaselined until the next Maintain batch
    re-authors it. Resuming a cut aoci_remove_entry or aoci remove-entry now
    settles pending AtomicWriteCAS exchanges on both the target Volume and
    .aoci/baseline.json before reading their preimages or postimages, so a
    hard kill mid-exchange no longer leaves orphaned .aoci-cas.{intent,swap}
    files behind. Read-only governance surfaces (aoci verify, aoci check,
    aoci status, and aoci index agent guide) now report recovery_pending
    (pending_atomic_write) when an unsettled .aoci-cas.intent,
    .aoci-cas.swap, .aoci-cas.swap.capture, or .aoci-cas.swap.exchange-backup
    sits beside a formal asset or .aoci/baseline.json;
    ordinary aoci_maintain (no arguments, or scope=code/scope=all) settles
    content-proven receiptless leftovers under the repository index lock—only
    deleting exchange files and never modifying any guarded asset's bytes—while
    explicit scope=database, intent=cognition_optimization, and batch_id
    requests never settle them. Non-receipted write paths (aoci_update_entry,
    aoci_remove_entry, CLI remove-entry, config set locale, index relocate,
    and fresh transactional applies) likewise use delete-only settlement and
    refuse with pending_atomic_write (or earlier contract stop codes on
    scope activate, database baseline accept, and root overview) and zero
    formal writes whenever a leftover cannot be proven safe to delete. On
    receipt-less paths, exchange reads bound intents to 4 KiB and swaps to
    max(16 MiB, 4 * target_size + 1 MiB) (receipted resumes impose no size cap);
    oversize and unprovable or content-changing leftovers stay blocked with
    per-file guidance in Guide.

See docs/install.md and docs/supply-chain.md for asset verification.