mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-12-06 12:24:44 +00:00
An operator company approval froze the company's whole inventory into task_scope_egress: every company_scope domain and IP/CIDR row plus the root_domain, domain and ip of every asset attributed to the company. The agent writes both (insert_assets, add_company_scope), so the next operator selection or re-approval promoted worker-chosen hosts into the sandbox egress allowlist for the life of the task. The snapshot now reads only company_scope domain and IP/CIDR rules with approved_by_operator = TRUE; the asset branches are gone. Migration 0025 adds the column and backfills existing rows as approved. The flag is an explicit parameter of insertScopeRulesTx and the CompanyStore scope writers: the operator company API passes true, add_company_scope and the ScopeSentry sync pass false. An operator write of a rule the agent stored first approves the existing row. AddOperatorScope outside a transaction now commits the task_scope row and the egress snapshot together. Existing task_scope_egress rows are not purged.