镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix: write timeline files in place, drop RestSharp, add a fixture for every encounter - #30

Merged
danifischer merged 3 commits into
masterfrom
chore/cleanup
Nov 11, 2026
Merged

danifischer merged 3 commits into
masterfrom
chore/cleanup

Conversation

@danifischer

Copy link
Copy Markdown
Owner

Summary

The three cleanup items from the list, in three commits.

1. Timeline files are no longer written via the current directory (fix(logic))
TimelineCreator wrote index.html/statistics.html into the current directory first and then moved them, so two runs with the same output name overwrote each other (a new test with 8 parallel builds fails 3/3 on the old code). The files are now written next to the target and moved over it (a timeline that cannot be written completely never replaces a good one; the old file is no longer deleted up front).

2. RestSharp is gone (fix(app))
DpsReportUploadService used RestSharp 106. New DpsReportClient on HttpClient:

  • multipart upload, token URL-encoded (it was concatenated raw)
  • readable errors from dps.report (rate limit 429, "unsupported log", html error pages) instead of crashing on an unexpected answer
  • the old code collected links in a plain List from Parallel.ForEach (race); now Parallel.ForEachAsync, a thread-safe collection, a stable output order, and a summary of how many logs failed
  • boss filter ids are compared case-insensitively (0x3c4e works)
  • RestSharp removed from the solution; 20 new tests (client with a stubbed handler, filter logic)

3. A fixture for every raid encounter (test)
14 new anonymized real-log fixtures for the encounters that had none, so all 24 definitions are covered. expected_columns.json holds the expected value of every column of every fixture, calculated from the raw json by make_expected_columns.py (a second implementation of the counting). BossMechanicsTests checks all columns, that every definition has a fixture, and that the renamed mechanics show up. Misspelling a mechanic in mechanics.json (tried on Xera, which had no fixture before) makes it fail.

  • trim_ei_json.py now keeps players that cover every mechanic, and removes player names inside target names ("Slubling 2 "); a check over all fixtures against the character and account names of the 157 source logs finds no real name
  • Only Dhuum Cone and Echo PU are 0 for everyone; they never happened in 8 real logs

Not in this PR

  • Database project (finish or remove) still needs your decision; ParsingTest.cs and plan.md belong to it
  • mechanics.local.json for your own encounters

Test plan

  • 143 offline tests (110 Logic, 33 App), 0 warnings
  • Regression check: restoring the old WriteHtmlFile makes the parallel test fail 3/3
  • CI green

🤖 Generated with Claude Code

danifischer and others added 3 commits November 11, 2026 21:25
…ent directory

The timeline and statistics were written to the current directory first and then
moved, so two runs with the same output name overwrote each other. They are now
written next to the target and moved over it, so a timeline that cannot be
written completely never replaces a good one. The old file is no longer deleted
up front.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- New DpsReportClient: multipart upload, URL-encoded token, readable errors from
  dps.report (rate limit, unsupported log, html error pages) instead of crashing
  on an unexpected answer
- The upload service collected links in a plain List from Parallel.ForEach (a race);
  it now uses Parallel.ForEachAsync, a thread-safe collection, a stable order and
  reports how many logs failed
- Boss filter ids are compared case-insensitively
- Remove RestSharp 106 from the solution
- Tests for the client and the filter

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- 14 new anonymized real-log fixtures (the encounters that had none); the
  existing ones were rebuilt so that every mechanic is covered by a kept player
- expected_columns.json holds the expected value of every column of every
  fixture, calculated from the raw json by make_expected_columns.py
- BossMechanicsTests checks all columns, that every definition has a fixture and
  that the renamed mechanics show up in their fixture
- trim_ei_json.py: choose players that cover all mechanics, anonymize player names
  inside target names (e.g. "Slubling 2 <character>")

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@danifischer
danifischer merged commit b350c8d into master Nov 11, 2026
danifischer added a commit that referenced this pull request Nov 12, 2026
Resolved the conflicts with the changes on master:
- TimelineCreator: kept the json based BuildTimelineFile and took over the
  atomic write of the output file (temporary file next to the target, then
  move) from #30
- TimelineCreatorTests: master's plain xUnit assertions, adapted to the
  single output file
- MechanicsTableBuilderTests: stays deleted, the html builders are gone
- TimelineDataBuilderTests: converted from FluentAssertions to xUnit assertions

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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