package controlplane

import (
	"database/sql"
)

// ReconcileManagedStandardObjectAccessPolicies updates authoritative access
// policy metadata for managed standard objects.
//
// Carved out of internal/bootstrap/schema.go in wave5 s5d (behavior-identical).
// The reconcile body and its private helpers stay in bootstrap (co-resident with
// the schema-package SharingModel/HierarchySharing primitives); this control-plane
// entry point reaches them through the exported
// schemaProvisioner.ReconcileManagedStandardObjectAccessPoliciesWithDefs port
// method using the substrate-owned managed table definitions.
//
// SharingModel retains legacy-baseline repair semantics so admin overrides are
// preserved while known discovered defaults are corrected. Other immutable
// policy fields such as EnableHierarchySharing are fully authoritative.
func ReconcileManagedStandardObjectAccessPolicies(rawDB *sql.DB) error {
	return schemaProvisioner.ReconcileManagedStandardObjectAccessPoliciesWithDefs(rawDB, managedTableDefinitions())
}
