# Preserve Parent Semantic Autonomy

<!-- auto-oncall-optimization-record
{
  "schemaVersion": "auto-oncall-optimization-record-v1",
  "optimizationId": "parent-semantic-autonomy-2026-08-05",
  "problems": [
    {
      "problemId": "parent-semantic-disagreement-discards-scenario-evidence",
      "summary": "A structurally valid scenario parent packet and its cited evidence were discarded when one parent-authored workload identity or objective-gate classification violated backend cross-field semantic rules.",
      "status": "optimized_verified",
      "issueKeys": ["TCID-12973", "APID-29231"],
      "sourceRefs": [
        "https://tidb.atlassian.net/browse/TCID-12973#problem:parent-provenance-semantic-rejection",
        "https://tidb.atlassian.net/browse/APID-29231#problem:parent-identity-proof-semantic-rejection"
      ],
      "signalTextIncludesAny": [
        "diagnostic_workload_identity_provenance_invalid",
        "diagnostic_workload_identity_proof_invalid",
        "parent semantic disagreement discarded complete child evidence"
      ],
      "observedThrough": "2026-08-05",
      "effectiveAt": "2026-08-05T10:42:00Z",
      "verifiedAt": "2026-08-05T11:07:27Z",
      "attemptedAction": "Replace the live parent packet response with a minimal decision schema owned by the scenario parent. Merge route and child transport metadata in the runner, and let higher-level synthesis revise unsupported conclusions instead of failing the scenario.",
      "evidenceUrl": "https://tidb.atlassian.net/browse/APID-29231"
    }
  ]
}
-->

- Optimization ID: `parent-semantic-autonomy-2026-08-05`
- Owner: auto-oncall-services
- Source references: staging replays for `TCID-12973` and `APID-29231`
- Implementation status: deployed to staging
- Effective status: `optimized_verified`

## Bounded problem

The scenario parent owns diagnosis and has broader context than its evidence
child. Its terminal packet was structurally valid and cited canonical evidence,
but backend cross-field rules treated one parent-authored classification as a
packet-level failure. The runner then replaced the whole result with an empty
bounded-failure packet, discarding unrelated observations and artifact refs.

## Implementation

- Keep schema shape, scenario identity, canonical evidence refs, bounded size,
  safe text, execution state, and checkpoint integrity as hard validation.
- Replace the live parent response with
  `auto-oncall-diagnostic-scenario-decision-v1`. The parent returns only its
  status, observations, counterevidence, mechanism, alternative,
  single monotonic workload-attribution conclusion, monitoring-semantics
  signal, severity, and handoff. The attribution state is exactly one of
  `causal_confirmed`, `identity_proven`, `correlated`, `unresolved`, or
  `not_applicable`, so conflicting identity, gate, and causal states cannot be
  emitted independently.
- Remove `source`, `provenance`, `kind`, `linkage`, `completeness`, objective
  gates, execution, bounded failures, and artifact inventory from the live
  parent response schema. The runner merges scenario identity, role,
  entity/window, current child handoff, execution state, and artifact inventory
  without comparing the two owners' semantic outputs.
- Treat parent conclusions as inputs to the higher-level synthesis. The final
  synthesis may correct an unsupported conclusion using broader context; the
  runner does not reject the scenario or rewrite the parent's diagnosis.
- Retain the old typed packet parser only for legacy packet and checkpoint
  compatibility. Its local reconciliation is not used by the new live response
  schema.

## Local verification

- TypeScript typecheck and build pass.
- The targeted diagnostic scenario, runner, and multiturn suites pass all 99
  tests.
- All 623 repository tests pass.
- The live decision schema has no source/provenance pair or independently
  authored objective gate, so the two replayed contradiction shapes cannot be
  expressed by a new parent response.
- A parent decision is merged with route and child-owned context while keeping
  all parent observations and canonical evidence refs. Extra legacy fields such
  as `provenance` are rejected structurally because they have no owner in the
  decision contract.
- Branch-local `mode=read` replay `APID-29231` run
  `959ed41f-be6d-4fa6-8174-7e792ebee42b` returned a terminal
  `auto-oncall-diagnostic-scenario-decision-v1`, wrote a complete
  `query-execution` checkpoint with five child-owned artifact refs, and did not
  emit `diagnostic_workload_identity_proof_invalid`.
- Branch-local control replay `ST-2865` run
  `3cf089c5-4761-4a7f-8c16-7987bf4cefa2` produced a terminal parent decision
  while its child handoff remained partial. The follow-up local runner change
  now preserves that partial execution state independently while retaining the
  parent decision and child-owned artifact refs.
- Branch-local `TCID-12973` run
  `c17c4128-2e8b-43c3-85a6-89b79a40b20d` reached the scenario reserve boundary
  before a terminal parent decision. Its partial checkpoint preserved four
  child artifacts and did not emit the former provenance validator error, but
  it does not verify the new decision schema for that case.
- Deployed `mode=write` replay `TCID-12973` run
  `60f1bb4f-3f2b-4382-ba4e-3f1e2c41ea0f` produced a complete child handoff,
  five artifacts, a terminal parent decision, and complete final synthesis. It
  did not emit provenance, proof, objective-gate, or packet mismatch errors.
  DB run `120017`, Feishu Base, and existing private Jira comment `23327373`
  were updated successfully.
- Deployed `mode=write` replay `APID-29231` run
  `de874fd8-c11c-416f-8b85-f57d59996f02` preserved seven Wetech artifacts and
  provider gaps, returned a terminal parent decision and complete synthesis,
  and did not emit `diagnostic_workload_identity_proof_invalid`. DB run
  `120018`, Feishu Base, and existing private Jira comment `23279460` were
  updated successfully.
- Both Jira comments were read back through Jira Platform and Service Desk APIs
  with the same comment IDs, expected bodies, and `public=false`.

## Unresolved gaps

- Provider acquisition gaps remain valid parent inputs rather than backend
  packet failures. APID-29231 still had bounded Wetech operation errors, but
  they no longer erased the complete observations and artifact inventory.
- The separate finalization-availability optimization owns synthesis timeout
  behavior and is independently verified by the same deployed source-case
  replays.

## Next validation action

Monitor for new post-verification parent packets rejected by cross-field
semantic validation. A structurally invalid packet remains an error; a valid
parent conclusion that disagrees with narrower child metadata must continue to
reach higher-level synthesis instead of failing the scenario.
