feat(toolkit): restore legacy parity APIs#13
Merged
Conversation
● 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.
There was a problem hiding this comment.
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, andAttributes, includingIDatabaseAccessimplemented byDBAccessand a newDBAccess.Compatibility.csasync-token overload partial - INI save path now tracks
;;;-doc-blocks so default-valued keys' attached docs are dropped together, plus newConfigDocumentationCatalog/IniDocumentationReaderand 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
| File | Description |
|---|---|
| Update-FromMaster.ps1 | Adds parameters, Windows guard, base-branch resolution, stash/cleanup hardening |
| Toolkit.Modern/Utilities/ReportTimestampFormatter.cs | New timestamp formatter with timezone label mapping |
| Toolkit.Modern/Logging/Models/LogRoutingContext.cs | New per-scope logger routing snapshot |
| Toolkit.Modern/Logging/Models/AsyncLoggerOptions.cs | New base options class for async logging |
| Toolkit.Modern/Logging/LogSecretMasker.cs | New regex-based secret masker |
| Toolkit.Modern/Logging/LogContext.cs | New AsyncLocal-based page identifier + routing context |
| Toolkit.Modern/Data/Database/IDatabaseAccess.cs | New shared DB access interface |
| Toolkit.Modern/Data/Database/DBAccess.Core.cs | Implements IDatabaseAccess |
| Toolkit.Modern/Data/Database/DBAccess.Compatibility.cs | New cancellation-token async overloads |
| Toolkit.Modern/Data/Database/DatabaseAccessFactory.cs | New legacy factory shim returning IDatabaseAccess |
| Toolkit.Modern/Configuration/Providers/* | New encoding/culture options providers |
| Toolkit.Modern/Configuration/Models/ConfigSectionSchema.cs | New config schema/options DTOs |
| Toolkit.Modern/Configuration/Models/ConfigDocumentationCatalog.cs | New documentation catalog types |
| Toolkit.Modern/Configuration/Interfaces/IConfigOptionsProvider.cs | New options-provider interface |
| Toolkit.Modern/Configuration/Helpers/IniDocumentationReader.cs | New INI doc/validation reader |
| Toolkit.Modern/Configuration/Configuration.cs | Preserves/drops attached doc blocks during save |
| Toolkit.Modern/Configuration/Attributes/ConfigOptionsProviderAttribute.cs | New provider attribute |
| Toolkit.Modern/Attributes/AssemblyDeveloperAttribute.cs | New legacy-style assembly metadata attributes |
| Toolkit.Modern.Tests/Unit/** | New unit tests covering the added surface |
| MIGRATION-legacy-toolkit.md | New migration guide |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
● Clarify log context clearing and database factory error behavior. ● Deduplicate routed loggers and use plain branch switching in the update script.
897877e to
28e19a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tests