Skip to content

feat(input): add read-only Enhanced Input asset inspection - #130

Open
kunkunGames wants to merge 1 commit into
tumourlove:masterfrom
kunkunGames:agent/enhanced-input-inspection
Open

feat(input): add read-only Enhanced Input asset inspection#130
kunkunGames wants to merge 1 commit into
tumourlove:masterfrom
kunkunGames:agent/enhanced-input-inspection

Conversation

@kunkunGames

@kunkunGames kunkunGames commented Aug 4, 2026

Copy link
Copy Markdown

Summary

Add a cohesive, read-only Enhanced Input asset inspection surface for discovering, paging, inspecting, and validating Input Actions and Input Mapping Contexts without mutating or dirtying packages.

Problem

Monolith exposes runtime and GAS-oriented input actions, but automation has no bounded asset-level preflight contract for Enhanced Input content. Callers currently have to reconstruct inventories and mapping checks themselves, and a truncated scan can be mistaken for a valid project-wide result.

Solution

Add five actions under a dedicated read-only and idempotent input dispatcher:

Action Purpose
list_input_actions Stable AssetRegistry discovery with bounded pagination and optional details
get_input_action Exact Input Action metadata with bounded trigger and modifier arrays
list_input_mapping_contexts Stable context discovery with optional bounded mapping summaries
get_input_mapping_context Exact context metadata with independent mapping pagination
validate_input_mappings Missing-action and invalid-key errors, duplicate-key warnings, and explicit scan completeness

All inputs require canonical mounted package paths or matching top-level object paths. Asset pages, mapping pages, instanced-object arrays, explicit context lists, and per-context validation scans have documented hard bounds. Validation distinguishes mapping-scan page_complete from pagination-level all_contexts_covered; global complete requires both, and valid=true additionally requires zero errors.

The dispatcher registers before the optional GAS authoring gate because Input Actions and Mapping Contexts are Enhanced Input assets, so these inspection actions remain available when GAS authoring is disabled.

Verification

  • UE 5.7 RunUAT BuildPlugin -NoTargetPlatforms -Rocket: 436/436 actions passed; UAT exit code 0
  • UE 5.8 RunUAT BuildPlugin -NoTargetPlatforms -Rocket: 436/436 actions passed; UAT exit code 0
  • final UE 5.7 Editor target rebuild after completeness hardening: 436/436 actions passed; UBT exit code 0
  • final UE 5.8 Editor target rebuild after completeness hardening: 436/436 actions passed; UBT exit code 0
  • namespace-policy follow-up rebuilt the implementation and tests independently, then linked successfully on UE 5.7 and 5.8
  • UE 5.7 Automation RunTests Monolith.Input.Assets: 3/3 passed, zero failures/skips, exit code 0
  • UE 5.8 Automation RunTests Monolith.Input.Assets: 3/3 passed, zero failures/skips, exit code 0
  • implementation scan found no transactions, saves, mutation calls, package-dirty calls, or write actions
  • new source and tests contain no anonymous namespaces, using namespace directives, or individual using declarations; every namespaced symbol is fully qualified at its use site
  • git diff --check passed
  • detailed evidence: Docs/testing/2026-08-04-enhanced-input-asset-inspection.md

Compatibility and risk

This PR adds direct AssetRegistry and InputCore dependencies to the existing editor-only MonolithGAS module; EnhancedInput was already a direct dependency. It does not add a runtime dependency or change the existing gas namespace.

The five actions never transact, compile, save, mutate, or dirty an asset package. Duplicate-key assignments are warnings rather than errors because Enhanced Input can intentionally map one key to multiple actions. Missing actions, invalid keys, load failures, and incomplete mapping scans fail validation explicitly; no fallback asset or substitute result is synthesized.

Visual evidence

Not applicable: this PR adds headless action handlers, schemas, automation tests, documentation, and routing guidance with no visual or editor-facing UI change.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 83bbabdc97

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Result->SetBoolField(TEXT("page_complete"), bPageComplete);
Result->SetBoolField(TEXT("all_contexts_covered"), bAllContextsCovered);
Result->SetNumberField(TEXT("errors"), ErrorCount);
Result->SetNumberField(TEXT("warnings"), WarningCount);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the numeric validation warning count

When the dispatcher generates any framework warning—for example, a normalized backslash in path, an unknown parameter, or conflicting response-shaping fields—FMonolithToolRegistry::ExecuteAction treats the top-level warnings field as its array-valued warning channel. Because this action stores a numeric count under the same key, the dispatcher fails to read it as an array and then replaces it with warning strings, so clients lose the validation count and see its type change. Use a distinct count field such as warning_count, leaving warnings available for the framework channel.

Useful? React with 👍 / 👎.

TEXT("List Enhanced Input action assets with stable bounded pagination"),
FMonolithActionHandler::CreateStatic(&HandleListInputActions),
FParamSchemaBuilder()
.OptionalAssetPath(TEXT("path"), TEXT("Canonical package root; defaults to /Game"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Disable path normalization for canonical-only parameters

For scalar path and asset_path inputs, registering these fields with OptionalAssetPath/RequiredAssetPath causes FMonolithToolRegistry::ExecuteAction to rewrite backslashes to slashes before these handlers run. Consequently inputs such as \Game\Input are accepted rather than rejected by ParsePackageFilter/ParseAssetPath, despite this feature's canonical-path contract; the same spelling in context_paths is rejected because that array is not normalized. Register the strict fields without the AssetPath kind, or otherwise validate the original value before normalization.

Useful? React with 👍 / 👎.

return nullptr;
}

UObject* Object = FSoftObjectPath(ObjectPath).TryLoad();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject redirectors before reporting an exact asset

When asset_path or an explicit context path names an existing UObjectRedirector, FSoftObjectPath::TryLoad follows it and returns the destination object. The request therefore succeeds—even though the advertised contract requires an exact path with no alternate asset—and may return an asset_path different from the one supplied; validation can likewise mark a stale redirected context path as valid. Verify that the loaded object's path still equals ObjectPath, or resolve the registry entry without following redirectors and reject redirector assets.

Useful? React with 👍 / 👎.

{
return false;
}
if (Seen.Contains(ObjectPath))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Deduplicate context paths using Unreal name semantics

When context_paths contains package-only spellings that differ only by case, this TSet<FString> check treats them as distinct even though Unreal object/package identity uses case-insensitive FName semantics. After the canonically cased entry loads the context, a differently cased entry can resolve to the same in-memory asset, so validation processes it twice and doubles its errors and warnings instead of rejecting the documented duplicate list. Compare normalized paths case-insensitively or store an FName deduplication key.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant