Skip to content

feat: centralise KSU, KSUN and SUSFS hash resolution in set-op-model#149

Merged
fatalcoder524 merged 8 commits intoWildKernels:mainfrom
luigimak:susfs_sha
Apr 2, 2026
Merged

feat: centralise KSU, KSUN and SUSFS hash resolution in set-op-model#149
fatalcoder524 merged 8 commits intoWildKernels:mainfrom
luigimak:susfs_sha

Conversation

@luigimak
Copy link
Copy Markdown
Contributor

@luigimak luigimak commented Mar 28, 2026

Resolves KSU/KSUN hashes via GitHub GraphQL API and SUSFS hashes via
GitLab REST API in set-op-model before any build starts, guaranteeing
hash consistency across parallel builds of the same GKI version.

build-kernel-release.yml:

  • set-op-model: added ksu_resolved_hash, ksu_options_normalized,
    susfs_hash_android*, active_gki_keys as job outputs; resolved hashes
    injected into merged_matrix (ksu_resolved_hash, susfs_resolved_hash)
  • build: removed "Resolve SUSFS branch from inputs" step; Build Kernel
    now reads ksu_resolved_hash and susfs_resolved_hash from matrix
  • Build plan summary: KSU shows 📌/🔀 format with resolved hash;
    SUSFS iterates active_gki_keys only with 📌/🔀/🔄 format
  • trigger-release: added set-op-model to needs; KSU/SUSFS tables read
    from needs.set-op-model.outputs; SUSFS Branch Mapping generated
    dynamically from active_gki_keys

action.yml:

  • Removed obsolete "unknown" and "next" fallback checks for KSU/SUSFS

@luigimak luigimak changed the title feat: fetch SUSFS commit hashes and expose in release notes feat: centralise SUSFS hash resolution and propagate via matrix and job outputs Mar 29, 2026
…ob outputs

Replaces per-build SUSFS branch resolution with a single centralised fetch in set-op-model.
Resolved hashes are propagated to build jobs via matrix injection (guaranteeing hash consistency across parallel builds of the same GKI version) and exposed to trigger-release and build plan summary via GitHub Actions job outputs.
Only GKI versions actually present in the run are shown in summary and release notes.

build-kernel-release.yml / set-op-model:
- outputs: added susfs_hash_android* (5 entries) and active_gki_keys (CSV of GKI versions with susfs: true in this run)
- Generate build matrix: added resolve_to_hash() function (ls-remote first: branch/tag > hash, 40-char hex > passthrough, invalid/timeout > "unknown");
  active_keys written to GITHUB_OUTPUT as active_gki_keys;
  hash results written to GITHUB_OUTPUT;
  susfs_resolved_hash injected into every device entry of merged_matrix via single jq pass;
  matrix output moved after inject
- Upload build matrix: reverted to single-file matrix.json upload (archive: false);
  susfs_hashes.json and dedicated susfs-hashes artifact fully removed
- Build plan summary: SUSFS Configuration section reads from steps.set-matrix.outputs.*;
  iterates over active_gki_keys only;
  three display formats based on input type:
   auto (empty)       → 🔄 auto (`<hash>`)
   hash (40-char hex) → 📌 `<hash>`
   branch (other)     → 🔀 `<branch>` (`<resolved hash>`)
   updated 💡 Note to reflect runtime hash resolution

build-kernel-release.yml / build:
- Resolve SUSFS branch from inputs: step removed entirely
- Build Kernel: susfs_commit_hash_or_branch reads from matrix.susfs_resolved_hash
- Build statistics + Job summary: updated accordingly

build-kernel-release.yml / trigger-release:
- Added set-op-model to needs;
  susfs_map declared as associative array;
  SUSFS Branch Mapping table generated dynamically from active_gki_keys;
  column header updated to SUSFS Commit

action.yml:
- Clone AnyKernel3 and Other Dependencies: added "unknown" to the fallback condition alongside "" and "next" so a failed ls-remote in set-op-model falls back to the default GKI branch gracefully
Extends the centralized hash resolution logic to KernelSU and KernelSU Next.
- Implements resolve_to_hash() for KSU/KSUN in set-op-model using git ls-remote.
- Propagates resolved 40-char hashes via job outputs and matrix injection.
- Updates build-kernel-release.yml summary and trigger-release to display branch/hash mappings.
- Refactors action.yml to handle "unknown" hash fallbacks for KSU/KSUN setup scripts.
- Consolidates resolve_to_hash() as a shared function for all external components.
@luigimak luigimak changed the title feat: centralise SUSFS hash resolution and propagate via matrix and job outputs feat: unify runtime hash resolution for SUSFS, KSU, and KSUN Mar 31, 2026
@fatalcoder524 fatalcoder524 force-pushed the susfs_sha branch 7 times, most recently from f481a2f to f4929e9 Compare April 1, 2026 15:21
@luigimak luigimak changed the title feat: unify runtime hash resolution for SUSFS, KSU, and KSUN feat: centralise KSU, KSUN and SUSFS hash resolution in set-op-model Apr 2, 2026
…ction.yml

- trigger-release: fix ksu_type/ksu_ref to read from needs.set-op-model.outputs
- SUSFS: replace git ls-remote with GitLab REST API (/repository/commits/{ref}), retry 3x, exit 1 on failure
- action.yml: remove obsolete "unknown" fallback checks
@luigimak luigimak marked this pull request as ready for review April 2, 2026 09:36
@fatalcoder524 fatalcoder524 merged commit 14ff2a6 into WildKernels:main Apr 2, 2026
@luigimak luigimak deleted the susfs_sha branch April 2, 2026 09:42
luigimak added a commit to luigimak/OnePlus-Remote-Action-Build that referenced this pull request Apr 2, 2026
luigimak added a commit to luigimak/OnePlus-Remote-Action-Build that referenced this pull request Apr 2, 2026
luigimak added a commit to luigimak/OnePlus-Remote-Action-Build that referenced this pull request Apr 2, 2026
fatalcoder524 pushed a commit to fatalcoder524/OnePlus-Remote-Action-Build that referenced this pull request Apr 2, 2026
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.

2 participants