Skip to content

cli/manifest: add manifest and lock data model#1305

Open
bigbes wants to merge 2 commits into
v3from
bigbes/tntp-8220-manifest
Open

cli/manifest: add manifest and lock data model#1305
bigbes wants to merge 2 commits into
v3from
bigbes/tntp-8220-manifest

Conversation

@bigbes

@bigbes bigbes commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Introduce cli/manifest, the data layer for tt packages: Go types for the manifest (app.manifest.toml) and lock (app.manifest.lock), TOML read/write, structural validation, format-version handling and manifest_hash. No git, no dependency resolution, no .rocks/ - only the standard library and the TOML library.

  • Manifest/Package/Platform with the platform constraint parsed into semver part and [ce]/[ee] flavor (Constraint via TextMarshaler).
  • Dependency decodes both the short (bare constraint string) and long (table) forms from one map via go-toml's unstable.Unmarshaler.
  • Lock serializes to the [lock.products.] table tree through an internal wire struct (go-toml does not split dotted struct tags).
  • Validate() does structural checks; format-version rules split unknown fields (warn on newer minor, fail otherwise, refuse newer major) from unknown enum values (always fail). manifest_hash is SHA-256 of the raw file bytes.

Closes TNTP-8220

Introduce cli/manifest, the data layer for tt packages: Go types for the
manifest (app.manifest.toml) and lock (app.manifest.lock), TOML read/write,
structural validation, format-version handling and manifest_hash. No git, no
dependency resolution, no .rocks/ - only the standard library and the TOML
library.

* Manifest/Package/Platform with the platform constraint parsed into
  semver part and [ce]/[ee] flavor (Constraint via TextMarshaler).
* Dependency decodes both the short (bare constraint string) and long
  (table) forms from one map via go-toml's unstable.Unmarshaler.
* Lock serializes to the [lock.products.<name>] table tree through an
  internal wire struct (go-toml does not split dotted struct tags).
* Validate() does structural checks; format-version rules split unknown
  fields (warn on newer minor, fail otherwise, refuse newer major) from
  unknown enum values (always fail). manifest_hash is SHA-256 of the raw
  file bytes.

Closes TNTP-8220
@bigbes bigbes force-pushed the bigbes/tntp-8220-manifest branch from a9110ef to ab294f8 Compare June 18, 2026 12:25
Sign up for free to 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.

1 participant