Skip to content

feat: generalize side effect taxonomy for multi-language support - #184

Merged
em-redhat merged 2 commits into
unbound-force:mainfrom
em-redhat:opsx/universal-taxonomy
Jul 3, 2026
Merged

em-redhat merged 2 commits into
unbound-force:mainfrom
em-redhat:opsx/universal-taxonomy

Conversation

@em-redhat

Copy link
Copy Markdown
Contributor

Summary

Generalizes Gaze's side effect taxonomy for multi-language support, completing the taxonomy layer of Issue #96.

  • Add 10 universal SideEffectType constants for language-neutral effects (ErrorSignal, GeneratorYield, ContainerMutation, StreamOutput, AsyncGeneratorYield, MetaprogrammingMutation, DescriptorEffect, ResourceManagement, ImportSideEffect, MonkeyPatch)
  • Add 11 language-neutral aliases for Go-specific types (e.g., AsyncTaskSpawn = GoroutineSpawn, FFICall = CgoCall)
  • Add Detail map[string]any field to taxonomy.SideEffect and protocol.AnalyzedSideEffect for language-specific metadata passthrough from external analyzers
  • Add ValidTypes set and IsKnownType function replacing the hardcoded isKnownP4 switch in the adapter
  • Update JSON Schema enum with all new types and detail property
  • Update docs/protocol.md with comprehensive 48-type reference table organized by tier, bump protocol version to 1.1.0
  • Update docs/porting/ guides with expanded type counts and tier tables

Total canonical types: 48 (38 existing + 10 new).

Closes #96

@em-redhat em-redhat moved this to In Review 👀 in Unbound Force Planning Jul 3, 2026
@em-redhat em-redhat self-assigned this Jul 3, 2026

@yvonnedevlinrh yvonnedevlinrh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

em-redhat added 2 commits July 3, 2026 15:08
config.Load accepted out-of-range and inverted classification
thresholds from .gaze.yaml without error, silently degrading
classification output. The [1,99] range check and coherence
check existed only in the CLI layer, bypassed by config-file
and non-CLI callers (loadGazeConfigBestEffort).

- Add contractual/incidental range validation [1, 99]
- Add coherence check (contractual > incidental)
- Add 10 unit tests with dedicated YAML fixtures
- Update CLI test assertion for new error path

Closes unbound-force#114
- Add 10 universal SideEffectType constants (ErrorSignal, GeneratorYield,
  ContainerMutation, StreamOutput, AsyncGeneratorYield,
  MetaprogrammingMutation, DescriptorEffect, ResourceManagement,
  ImportSideEffect, MonkeyPatch)
- Add 11 language-neutral aliases for Go-specific types
- Add Detail field to SideEffect and protocol types for language-specific
  metadata passthrough
- Add ValidTypes set and IsKnownType function replacing hardcoded
  isKnownP4 switch
- Update JSON Schema enum and protocol docs with 48-type reference table
- Bump protocol version to 1.1.0
- Update porting docs with expanded type counts and tier tables

Closes unbound-force#96
@em-redhat
em-redhat force-pushed the opsx/universal-taxonomy branch from 4657ca3 to 1713b43 Compare July 3, 2026 14:09
@em-redhat
em-redhat merged commit 9406f27 into unbound-force:main Jul 3, 2026
5 checks passed
@em-redhat
em-redhat deleted the opsx/universal-taxonomy branch July 3, 2026 14:29
@em-redhat em-redhat moved this from In Review 👀 to Done ✔️ in Unbound Force Planning Jul 3, 2026
yvonnedevlinrh added a commit to yvonnedevlinrh/gaze that referenced this pull request Jul 9, 2026
Fix two gofmt formatting issues introduced by recent PRs:
- internal/adapter/sideeffect.go: trailing blank line (PR unbound-force#180)
- internal/taxonomy/types_test.go: misaligned struct field tags (PR unbound-force#184)

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Yvonne Devlin <[email protected]>
jflowers pushed a commit to jflowers/gaze that referenced this pull request Jul 24, 2026
Fix two gofmt formatting issues introduced by recent PRs:
- internal/adapter/sideeffect.go: trailing blank line (PR unbound-force#180)
- internal/taxonomy/types_test.go: misaligned struct field tags (PR unbound-force#184)

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Yvonne Devlin <[email protected]>
sonupreetam pushed a commit to sonupreetam/gaze that referenced this pull request Aug 12, 2026
Fix two gofmt formatting issues introduced by recent PRs:
- internal/adapter/sideeffect.go: trailing blank line (PR unbound-force#180)
- internal/taxonomy/types_test.go: misaligned struct field tags (PR unbound-force#184)

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Yvonne Devlin <[email protected]>
Signed-off-by: sonupreetam <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done ✔️

Development

Successfully merging this pull request may close these issues.

feat: generalize side effect taxonomy for multi-language support

2 participants