Skip to content

🤖 fix(parser,resolver,daemon): address core functionality drift and remediations - #30

Merged
thenom merged 1 commit into
mainfrom
fix/core-remediations-and-drift
Oct 12, 2026
Merged

thenom merged 1 commit into
mainfrom
fix/core-remediations-and-drift

Conversation

@thenom

@thenom thenom commented Oct 12, 2026

Copy link
Copy Markdown
Owner

🤖 AI Assistance Disclosure

This pull request was developed and co-authored with the assistance of Antigravity (Advanced Agentic Coding AI).

  • Prompt / Context: Review codebase for potential drift, functional discrepancies, and edge cases; implement remediations on a dedicated branch; synchronize architectural guidelines in AGENTS.md and docs/ARCHITECTURE_BLUEPRINT.md.
  • Tools & Verification: TypeScript type checking (tsc -b), Vitest test suite (npm test), OpenTofu validation (tofu init, tofu fmt -check, tofu validate), Go daemon test suite (go test ./...), Go binary verification against live Star Citizen game files (sc-daemon -p), and git pre-commit hooks (pre-commit run --all-files).

Summary of Changes

1. Chorded Modifiers & Physical Key Parsing

  • ActionMapsParser.ts (parseInputDescriptor): Enhanced input parser to reliably separate physical device prefixes and buttons from chord modifiers across Star Citizen conventions (e.g., lalt+js1_button5, lctrl+lalt+js2_button3, and kb1_lalt+c).
  • BindingEditorModal.tsx: Updated input editing handler to invoke ActionMapsParser.parseInputDescriptor rather than naive regex, preserving device prefix, physical key, and chord modifiers.

2. Mixed-Case CryEngine Action Map Resolution

  • CatalogManager.ts: Made action map lookups (getActionMap, getUnboundActions) case-insensitive to ensure mixed-case CryEngine action map definitions (e.g. IFCS_controls) are resolved without casing discrepancies.

3. Lossless Axis Options Round-Tripping

  • ActionMapsParser.ts & ActionMapsExporter.ts: Added support for extracting and serializing deadzone and sensitivity attributes in <options type="joystick"> blocks, ensuring fine-tuned hardware deadzones and sensitivities are preserved through round-trip export.

4. Explicit Empty Rebinds for Cleared Actions

  • ActionMapsExporter.ts: Serializes <rebind input=""/> when an action's inputs are cleared (inputs: []), explicitly overriding engine defaults in Star Citizen's CryEngine delta overlay architecture.
  • ActionMapsParser.ts: Preserves <rebind input=""/> attributes as intentional unbinds rather than discarding them.

5. Conflict Severity Hierarchy & Audit Sorting

  • ConflictResolver.ts: Introduced getSeverityPriority() enforcing the priority order: Fatal (3) > Warning (2) > Redundant (1) > None (0).
  • Ensured pairwise multi-input evaluations do not exit early on Redundant before checking for higher-priority Fatal collisions.
  • Updated conflict report sorting to place Fatal collisions ahead of Warnings, and Warnings ahead of Redundancies.

6. Canonical Action Naming & Resource Leak Prevention

  • HardwareGeneratorModal.tsx: Updated sample XML export to use canonical CryEngine action name v_space_brake.
  • locator.go: Replaced loop-scoped defer f.Close() calls with immediate file handle closing in launcher log and candidate search loops to prevent file descriptor leaks.

7. Documentation & Invariant Updates

  • AGENTS.md: Added technical invariants covering chord syntax, case-insensitivity, lossless options, unbind semantics, conflict priority ranking, and Go daemon resource management.
  • docs/ARCHITECTURE_BLUEPRINT.md: Updated React version reference (React 18) and added the 4-tier conflict severity spectrum (Redundant = 3).

Verification

  • npm test: All 21 test suites passed (215 tests).
  • go test ./...: All Go daemon unit tests passed.
  • tofu fmt -check && tofu validate: Infrastructure validation succeeded.
  • pre-commit run --all-files: All formatters, linters, secret scans, and policy checks passed.

…emediations

- Support chorded joystick and keyboard modifiers in parser and binding editor (e.g. lalt+js1_button5)
- Support case-insensitive CryEngine action map lookups in CatalogManager (e.g. IFCS_controls)
- Round-trip options axis deadzones and sensitivities losslessly in ActionMapsParser and ActionMapsExporter
- Serialize explicit empty rebinds (<rebind input=""/>) when bindings are cleared to prevent default fallback
- Prioritize Fatal collisions over Redundant conflicts in ConflictResolver pairwise checks and audit sorting
- Use canonical CryEngine action name v_space_brake in hardware generator template
- Close file descriptors immediately in discovery loops in locator.go to prevent leaks
- Update AGENTS.md and ARCHITECTURE_BLUEPRINT.md with technical invariants covering all remediations
@thenom
thenom merged commit be7f97a into main Oct 12, 2026
9 checks passed
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