Skip to content

Feature/tag system expansion 375 379 - #396

Open
Trosper3 wants to merge 4 commits into
CSharpAPIfrom
feature/tag-system-expansion-375-379
Open

Feature/tag system expansion 375 379#396
Trosper3 wants to merge 4 commits into
CSharpAPIfrom
feature/tag-system-expansion-375-379

Conversation

@Trosper3

@Trosper3 Trosper3 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Backend — Redux repo, branch feature/tag-system-expansion-375-379

Two commits, both on top of ad5bdb1:

71ca932 — Add ReductionType/ReductionComplexityBucket vocabularies and wire most-efficient-reduction ranking (#376)

  • New ReductionType enum (Restriction / LocalReplacement / ComponentDesign — Garey & Johnson proof-technique taxonomy) and ReductionComplexityBucket enum (Constant→Exponential runtime buckets), both as default interface members on IReduction mirroring the existing ReductionCost pattern
  • Read all 20 reduce() methods and declared both values on each, with a one-line justification comment per class
  • ReductionEfficiency.MostEfficient — ranks by complexity bucket first (what "most efficient" means per Assign Reduction Types, and Verify Problems Default to Most Efficient Reduction #376), cost as tiebreak; wired into /Navigation/Reductions' edge sort order so the default reduction returned actually is the most efficient one
  • ReductionType_Tests.cs: serialization regression guards + ratchet pairs (NoNewUndeclared*/AllowlistHasNoStaleEntries*) for both new enums

7c1a70f — Added complexity and big-O details to Problems and added unit tests

  • Backfilled the free-text Big-O complexity string on all 17 reductions that lacked one (10 had it declared as null, 7 didn't have the property at all)
  • New ReductionTypeCatalog.ComplexityByClassName (reads via reflection since complexity is deliberately not part of IReduction — it's free text, not a closed vocabulary)
  • Third ratchet pair (NoNewUndeclaredComplexity/AllowlistHasNoStaleComplexityEntries) added to ReductionType_Tests.cs, guarding against this regressing back to empty

Full suite: 757/757 passing.

Closes #375
Closes #376
Closes #377
Closes #378
Closes #379
Closes #395

Linked to ReduxISU/Redux_GUI#161

…t-efficient-reduction ranking (#376)

Declares the Garey & Johnson reduction technique (Restriction/LocalReplacement/
ComponentDesign) and a runtime complexity bucket on all 20 reductions by reading
each reduce() method, mirroring the existing ReductionCost "declared, not derived"
convention. ReductionEfficiency ranks by complexityBucket first (what "most
efficient" means per the issue) with ReductionCost as a tiebreak, and that ranking
now drives which parallel reduction edge sorts first in /Navigation/Reductions.

Ranking a default reduction by wall-clock time needed a metric the codebase didn't
have (ReductionCost only measures output-instance blow-up) -- filed as #395 and
implemented separately since it's an independent, unblocking axis.
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown

Redux Build System — CI Report

dotnet · commit 9f00b0f

Operation Status Summary Time
audit no known vulnerabilities 4.5s
format-check 214 files need formatting 20.8s
lint 0 issues 11.2s
typecheck ⏭️ covered by lint (dotnet build)
unit-test 823 passed · coverage 63% (min 80%) 23.0s
build built local/redux:ci · 240MB 12.7s
integration-test ⏭️ no [integration] command
push ⏭️ not implemented

Overall: ❌ 3 passed · 2 failed · 3 skipped

❌ format-check — 214 files need formatting
Severity Location Rule Message
error AdditionalControllers/Navigation/ContributerProfile.cs:100 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:104 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:111 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:12 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n'.
error AdditionalControllers/Navigation/ContributerProfile.cs:120 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:121 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:125 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:139 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:144 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:147 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:153 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:156 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:158 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:160 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:170 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:174 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:176 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:187 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:188 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s'.
error AdditionalControllers/Navigation/ContributerProfile.cs:191 WHITESPACE Fix whitespace formatting. Replace 1 characters with '\n\s\s\s\s\s\s\s\s\s\s\s\s'.
… and 3442 more

@wrigjl wrigjl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like where this is headed and I'm sorry I'm creating some grief for you by deleting the newtonsoft stuff.

Comment thread Interfaces/ReductionComplexityBucket.cs Outdated
/// <c>ReductionEfficiency.IsFasterThan</c>.
/// </para>
/// </summary>
[Newtonsoft.Json.JsonConverter(typeof(StringEnumConverter))]

@wrigjl wrigjl Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This will be a problem. I removed the Newtonsoft.Json stuff because it is no longer the favored way of handling json conversion. The new hotness in the .NET world is System.Text.Json

It was removed today: #351

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh ok, I didn't realize that. Thanks for the info

Picks up #351 (Newtonsoft.Json -> System.Text.Json migration) plus
everything else merged to CSharpAPI since this branch's base, ahead of
fixing the stale [Newtonsoft.Json.JsonConverter] attribute wrigjl
flagged in review.
…plexityBucket

Both enums carried a leftover [Newtonsoft.Json.JsonConverter(StringEnumConverter)]
alongside the System.Text.Json one. Newtonsoft.Json was removed repo-wide in
#351 (merged in the CSharpAPI sync above), so the attribute no longer
compiles once the package reference is gone. The System.Text.Json
[JsonConverter(JsonStringEnumConverter<T>)] attribute already present on
both enums is sufficient on its own, matching ReductionCost/SolverType/
VisualizationType's post-#351 pattern.

Per wrigjl's review comment on PR #396.
@Trosper3

Copy link
Copy Markdown
Contributor Author

This should be better now.

@Trosper3
Trosper3 requested a review from wrigjl August 12, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants