Refactor invocation audit skill validator

This commit is contained in:
axiomlogicnexus 2026-06-24 08:05:57 +00:00
parent 38b784b3c0
commit c8cb1bfb8d
4 changed files with 122 additions and 70 deletions

View file

@ -580,6 +580,65 @@ bool FHyperTwistSkillControlState::IsStructurallyValid() const
return true;
}
bool FHyperTwistSkillInvocationRecord::IsStructurallyValid() const
{
if (InvocationId.IsEmpty()
|| SkillId.IsEmpty()
|| DisplayLabel.IsEmpty()
|| SessionId.IsEmpty()
|| RunId.IsEmpty()
|| StartedAtUtc.IsEmpty()
|| CompletedAtUtc.IsEmpty()
|| Outcome == EHyperTwistSkillInvocationOutcome::None
|| WarningState.IsEmpty()
|| !CommandProvenance.IsStructurallyValid()
|| !bInvocationTraceable
|| !bOutcomeRecorded
|| !HyperTwistSkillTypesInternal::AreAllItemsStructurallyValid(ProducedArtifacts))
{
return false;
}
switch (Outcome)
{
case EHyperTwistSkillInvocationOutcome::Succeeded:
if (FailureReason.Len() > 0
|| CancelReason.Len() > 0
|| ProducedArtifacts.Num() == 0
|| !bOutputBecameProductTruth
|| !bOutputTraceable)
{
return false;
}
break;
case EHyperTwistSkillInvocationOutcome::Failed:
if (FailureReason.IsEmpty()
|| CancelReason.Len() > 0
|| ProducedArtifacts.Num() != 0
|| bOutputBecameProductTruth)
{
return false;
}
break;
case EHyperTwistSkillInvocationOutcome::Cancelled:
if (CancelReason.IsEmpty()
|| FailureReason.Len() > 0
|| ProducedArtifacts.Num() != 0
|| bOutputBecameProductTruth)
{
return false;
}
break;
default:
return false;
}
return !bOutputBecameProductTruth || bOutputTraceable;
}
bool FHyperTwistSkillAuditLedgerState::IsStructurallyValid() const
{
if (RegistryId.IsEmpty()

View file

@ -849,76 +849,7 @@ struct FHyperTwistSkillInvocationRecord
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist")
FString Summary;
bool IsStructurallyValid() const
{
if (InvocationId.IsEmpty()
|| SkillId.IsEmpty()
|| DisplayLabel.IsEmpty()
|| SessionId.IsEmpty()
|| RunId.IsEmpty()
|| StartedAtUtc.IsEmpty()
|| CompletedAtUtc.IsEmpty()
|| Outcome == EHyperTwistSkillInvocationOutcome::None
|| WarningState.IsEmpty()
|| !CommandProvenance.IsStructurallyValid()
|| !bInvocationTraceable
|| !bOutcomeRecorded)
{
return false;
}
for (const FHyperTwistSkillProducedArtifactState& Artifact : ProducedArtifacts)
{
if (!Artifact.IsStructurallyValid())
{
return false;
}
}
switch (Outcome)
{
case EHyperTwistSkillInvocationOutcome::Succeeded:
if (FailureReason.Len() > 0
|| CancelReason.Len() > 0
|| ProducedArtifacts.Num() == 0
|| !bOutputBecameProductTruth
|| !bOutputTraceable)
{
return false;
}
break;
case EHyperTwistSkillInvocationOutcome::Failed:
if (FailureReason.IsEmpty()
|| CancelReason.Len() > 0
|| ProducedArtifacts.Num() != 0
|| bOutputBecameProductTruth)
{
return false;
}
break;
case EHyperTwistSkillInvocationOutcome::Cancelled:
if (CancelReason.IsEmpty()
|| FailureReason.Len() > 0
|| ProducedArtifacts.Num() != 0
|| bOutputBecameProductTruth)
{
return false;
}
break;
default:
return false;
}
if (bOutputBecameProductTruth && !bOutputTraceable)
{
return false;
}
return true;
}
bool IsStructurallyValid() const;
};
USTRUCT(BlueprintType)

View file

@ -824,6 +824,45 @@ Latest same-lane follow-up later still on `2026-06-24`:
`FHyperTwistSkillInvocationRecord`, with only smaller header-inline seams
behind it
Latest same-lane follow-up after that on `2026-06-24`:
- the next bounded Unreal refactor seam then removed
`FHyperTwistSkillInvocationRecord::IsStructurallyValid()` from the public
skill header and gave it a private owner in
`Private/HyperTwistSkills/HyperTwistSkillTypes.cpp`
- the owned source-only structural gate improved again under that packet:
- `scripts/run-hypertwist-sentrux-source-only.sh`
- `Quality: 6183`
- all `7` checked rules passing
- a fresh inline-body scan on
`Public/HyperTwistSkills/HyperTwistSkillTypes.h` then confirmed that no
large skill-family validator remained there; the current largest inline
validators are now:
- `FHyperTwistSkillValidationContractCase` at `39` lines
- `FHyperTwistSkillCommandProvenanceState` at `37` lines
- `FHyperTwistSkillManifestEntry` at `37` lines
- the touched skill files were then hash-synced into the maintained Windows
validation root again:
- `C:\HyperTwist_worktrees\phase10validate`
- the doctrine-clean Windows Unreal rerun for this second seam then succeeded
with:
- `Result: Succeeded`
- parallel executor time `486.03 seconds`
- total execution time `499.80 seconds`
- the same real build lane again compiled the directly affected skill packet
family in that rerun, including:
- `HyperTwistSkillPhaseS1CInvocationAuditLedgerContractTest.cpp`
- `HyperTwistSkillPhaseS3BRecallCompactViewContractTest.cpp`
- `HyperTwistSkillPhaseS3CWorkflowMemoryCaptureContractTest.cpp`
- `HyperTwistSkillTypes.cpp`
- current highest-signal structural reading after this latest packet:
- the broad “vanilla refactor” debt is no longer centered on oversized
public-header skill validators
- the browser/public/manual lane remains clean and green
- the next remaining structural choices are now genuinely smaller seams or
broader product-quality work, not another obvious large skill-header
validator family
## Out of scope
This note does not:

View file

@ -219,6 +219,29 @@ Latest later same-lane follow-up still on `2026-06-24`:
- the next meaningful structural target is now
`FHyperTwistSkillInvocationRecord`
Latest follow-up after that still on `2026-06-24`:
- the next bounded seam then moved
`FHyperTwistSkillInvocationRecord::IsStructurallyValid()` out of the public
skill header and into `Private/HyperTwistSkills/HyperTwistSkillTypes.cpp`
- `scripts/run-hypertwist-sentrux-source-only.sh` improved again to:
- `Quality: 6183`
- all `7` rules passing
- the public skill header no longer has a large skill-family validator left at
the top of the inline-debt list; the largest remaining inline validators are
now much smaller, led by:
- `FHyperTwistSkillValidationContractCase` at `39` lines
- the doctrine-clean Windows Unreal rerun against
`C:\HyperTwist_worktrees\phase10validate` also succeeded again:
- `Result: Succeeded`
- parallel executor time `486.03 seconds`
- total execution time `499.80 seconds`
- current truthful “vanilla refactor” reading now tightens again:
- the browser/public/manual lane remains green
- the obvious oversized public skill-header validator family is drained
- remaining structural work is now smaller-seam cleanup or broader
product-quality hardening, not another big skill-validator extraction
## Canonical development authorities
Use these before widening implementation: