Repository navigation
refactor(model): extract id generator into pkg/model/id and use uint32 for log ID - #937
Merged
Merged
Conversation
kyasbal
requested review from
K53,
RyuSA,
jyane,
kkuchima and
renamoo
as code owners
September 2, 2026 01:47
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a centralized id.Generator to replace string-based IDs with uint32 IDs, enhancing memory and disk efficiency for the KHI model. It updates the Log model, LogAccumulator, and various test suites to support this change. The reviewer suggested an optimization in LogAccumulator to use slices.Grow for more efficient slice growth.
…2 for log ID - Extract ID generator and namespaces from pkg/model/khifile/v6 to pkg/model/id. - Change Log.ID from string to uint32 with id.Generator. - Require *id.Generator in khifilev6.NewBuilder. - Use inspectioncore_contract.IDGenerator and WithDefaultTestInspectionTaskContext for context-based ID generation. - Update all affected tasks, parsers, and unit tests across the backend.
kyasbal
force-pushed
the
push-rurnkmruxukq
branch
from
September 2, 2026 03:39
283d3f6 to
c9f5a49
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
pkg/model/khifile/v6/ids.gointo dedicatedpkg/model/idpackage.Log.IDfromstringtouint32usingid.TemporaryLog(during parsing/staging) andid.Log(when serialized).*id.Generatorinkhifilev6.NewBuilder.inspectioncore_contract.IDGenerator.inspectiontest.WithDefaultTestInspectionTaskContextacross tests and cookbook documentation, removing manual ID generator and builder initialization from individual test cases.Verification
make build-go: OKmake test-go: OKmake lint-go: OKmake format-go: OKmake pre-commit: OK