fix(library): 按目标身份隔离版本授权与执行历史
build / build (push) Successful in 1m47s

This commit is contained in:
姚章浩
2026-10-31 02:15:15 +08:00
parent 323f9ae502
commit 7ab2eb1ccf
15 changed files with 473 additions and 72 deletions
+11 -1
View File
@@ -23,7 +23,17 @@ type database interface {
}
type Store struct {
db database
db database
libraryTargetID string
}
// WithLibraryTarget isolates release facts without mutating a shared Store.
// The empty namespace retains legacy evidence; live API/workers bind a nonempty
// identity before exposing library operations. Source seals remain independent.
func (s *Store) WithLibraryTarget(id string) *Store {
copy := *s
copy.libraryTargetID = id
return &copy
}
func NewStore(db database) *Store {