Skip to content

feat(toolkit): restore legacy parity APIs - #13

Merged
PaulStSmith merged 5 commits into
masterfrom
legacy-toolkit-parity-tests
May 17, 2026
Merged

feat(toolkit): restore legacy parity APIs#13
PaulStSmith merged 5 commits into
masterfrom
legacy-toolkit-parity-tests

Conversation

@PaulStSmith

Copy link
Copy Markdown
Member

Summary

  • Restore legacy-compatible Toolkit APIs for assembly metadata, configuration docs/options, DBAccess factory/interface shims, logging context/masking, and report timestamps
  • Preserve INI documentation cleanup behavior for default-valued keys
  • Add migration notes documenting modern syntax differences and the intentional DBAccess2 exclusion
  • Add unit tests for the new compatibility surface and edge cases
  • Include existing Update-FromMaster.ps1 hardening for configurable base branch, remote, and push behavior

Tests

  • dotnet test .\Toolkit.Modern.Tests\ByteForge.Toolkit.Modern.Tests.csproj --configuration Debug --no-restore
  • net9.0: 986 passed
  • net48: 986 passed

● Preserve documentation blocks only when their associated INI keys are saved.
● Add regression coverage for documented default-valued keys.
● Add legacy-compatible assembly, configuration, database, logging, and timestamp helpers.
● Document migration differences and keep DBAccess2 intentionally excluded.
● Add tests for factory shims, logging context, secret masking, and timestamp formatting.
● Cover provider attribute validation and assembly metadata constructors.
● Allow configurable base branches, remotes, and optional push behavior.
● Harden cleanup when git operations or stash restoration cannot safely continue.
CopilotAI review requested due to automatic review settings May 17, 2026 15:03

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Restores a broad set of legacy-parity Toolkit APIs (assembly metadata attributes, configuration documentation/schema/options, DBAccess factory + IDatabaseAccess shim with cancellation-token overloads, logging context/masking, report timestamp formatting), preserves INI documentation cleanup when keys carry default values, adds migration notes, expands unit tests, and hardens Update-FromMaster.ps1 with configurable base branch/remote/push behavior.

Changes:

  • New legacy-compat surface across Configuration, Data/Database, Logging, Utilities, and Attributes, including IDatabaseAccess implemented by DBAccess and a new DBAccess.Compatibility.cs async-token overload partial
  • INI save path now tracks ;;;-doc-blocks so default-valued keys' attached docs are dropped together, plus new ConfigDocumentationCatalog/IniDocumentationReader and option provider attribute/providers
  • Update-FromMaster.ps1 supports -BaseBranch, -RemoteName, -NoPush, robust base-branch detection, improved cleanup/stash restoration logic, and Windows-only guard

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.

Show a summary per file
FileDescription
Update-FromMaster.ps1Adds parameters, Windows guard, base-branch resolution, stash/cleanup hardening
Toolkit.Modern/Utilities/ReportTimestampFormatter.csNew timestamp formatter with timezone label mapping
Toolkit.Modern/Logging/Models/LogRoutingContext.csNew per-scope logger routing snapshot
Toolkit.Modern/Logging/Models/AsyncLoggerOptions.csNew base options class for async logging
Toolkit.Modern/Logging/LogSecretMasker.csNew regex-based secret masker
Toolkit.Modern/Logging/LogContext.csNew AsyncLocal-based page identifier + routing context
Toolkit.Modern/Data/Database/IDatabaseAccess.csNew shared DB access interface
Toolkit.Modern/Data/Database/DBAccess.Core.csImplements IDatabaseAccess
Toolkit.Modern/Data/Database/DBAccess.Compatibility.csNew cancellation-token async overloads
Toolkit.Modern/Data/Database/DatabaseAccessFactory.csNew legacy factory shim returning IDatabaseAccess
Toolkit.Modern/Configuration/Providers/*New encoding/culture options providers
Toolkit.Modern/Configuration/Models/ConfigSectionSchema.csNew config schema/options DTOs
Toolkit.Modern/Configuration/Models/ConfigDocumentationCatalog.csNew documentation catalog types
Toolkit.Modern/Configuration/Interfaces/IConfigOptionsProvider.csNew options-provider interface
Toolkit.Modern/Configuration/Helpers/IniDocumentationReader.csNew INI doc/validation reader
Toolkit.Modern/Configuration/Configuration.csPreserves/drops attached doc blocks during save
Toolkit.Modern/Configuration/Attributes/ConfigOptionsProviderAttribute.csNew provider attribute
Toolkit.Modern/Attributes/AssemblyDeveloperAttribute.csNew legacy-style assembly metadata attributes
Toolkit.Modern.Tests/Unit/**New unit tests covering the added surface
MIGRATION-legacy-toolkit.mdNew migration guide

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadToolkit.Modern/Logging/LogContext.cs
Comment threadToolkit.Modern/Data/Database/DatabaseAccessFactory.cs
Comment threadToolkit.Modern/Logging/Models/LogRoutingContext.cs
Comment threadUpdate-FromMaster.ps1 Outdated
● Clarify log context clearing and database factory error behavior.
● Deduplicate routed loggers and use plain branch switching in the update script.
@PaulStSmith
PaulStSmithforce-pushed the legacy-toolkit-parity-tests branch from 897877e to 28e19a0CompareMay 17, 2026 15:53
@PaulStSmith
PaulStSmith changed the base branch from develop to masterMay 17, 2026 15:53
@PaulStSmith
PaulStSmith merged commit 7941a68 into masterMay 17, 2026
2 of 4 checks passed
Sign up for freeto 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.

2 participants

@PaulStSmith