Skip to content

chore(api): follow-ups from the review of the API, conversion tests and docs follow-ups (#191) #194

Done

Description

@mwg-bender

This was generated by AI during validation.

Follow-ups from the code review of #191 (API, conversion tests and docs). Nothing here blocked the merge. Standards axis: one item first marked hard, treated as soft (item 1). Spec axis: no hard findings.

  1. File size. EventMetricsTests.cs grew from 606 to 624 lines, and ApiValidationRouteTests.cs is at 400, while this PR adds the "about 400 lines" rule to AGENTS.md. Several Api test files predate it: CommentApiTests 524, FeedbackTests 573, ActivityNoteConversionTests 494. Split them.
  2. Expected values from the production constants. Tests assert TableNames.CommentPartition (CommentApiTests.cs:119, ActivityNoteConversionTests.cs:64,403) and the Azurite tests build their stores from TableNames, so renaming a table would still pass every test. Pin the literal names once in one test.
  3. The Azurite query test does not prove filtering happens in storage (StorageQueryAzuriteTests.cs:43-79): a list that read the whole partition and filtered in memory would still pass; only CommentRowsRead == [1,1] catches it. Line 75 checks the cascade with GetWhereAsync, the code under test.
  4. Azurite conversion tests. They do not restore the marker as found (the finally blocks don't), and the pass converts every old-column row in that storage, not only the seeded ones. README should warn against pointing EM_AZURITE_CONNECTION at storage that isn't throwaway. All four Azurite tests skip in CI because .github sets no EM_AZURITE_CONNECTION.
  5. No registration test. Program.cs using TableNames is not tested; moving the registrations into an IServiceCollection extension would allow a plain test. Raw "Activity" partition literals remain in test seeds (ApiValidationRouteTests.cs:38, DeleteInUseRefusalTests.cs:65, PropertyLimitTests.cs:168). TableNames covers 2 of the 7 tables.
  6. Duplicates and dead code. Flow<T> is copied in ActivityNoteConversionAzuriteTests.cs:23 and StorageQueryAzuriteTests.cs:19; StoreKeyed/CheckKeyed in PartitionedTableMock.cs repeat Store/Check; unused using System.Linq.Expressions; at CommentApiTests.cs:1; OldActivityRows.OldTextColumn exists but ActivityNoteConversionTests still writes "Comments" about 15 times.
  7. Vocabulary. RetiredCommentsFieldTests and its test name call the retired column "Comments"; ActivityNoteConversionStartup, the harness's NoteConversion and the "activity-note:" hash salt keep "note" beyond the two names the GLOSSARY exception lists.
  8. Docs. docs/api-validation.md:67 still says the snapshot "no longer carries the Activity's Comments"; :69 only implies that a running host never converts an old column written after its first pass (one explicit sentence would close fix(api): follow-ups from the review of the Activity note conversion (#167) #169.1); the GLOSSARY Library entry carries implementation detail.
  9. The commit type is chore(api) but includes a behaviour fix (the Like-count parse, TryParseExact "D", which also accepts uppercase hex keys; harmless because writes are lowercase). CommentApiTests.Stored() is a Middle Man.

Evidence: the Standards and Spec reports of the review of #191 (head 26cdfa0); cold validation: 0 warnings, Api 495 + 4 skipped, Web 679.

Activity

  1. added this to the 0.6.0 milestone on Nov 21, 2026
  2. mwg-bender commented on Nov 27, 2026

    @mwg-bender
    ContributorAuthor

    Disposition of the #194 items, recorded here so the issue stands on its own:

    This issue closes when #258 merges.

  3. mwg-bender commented on Nov 28, 2026

    @mwg-bender
    ContributorAuthor

    #258 merged as ea40dc0 and its commit runs the Azurite tests in build-and-test (green on 1a82564), which was the last open item in the disposition above. Closing.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions