shivaam opened a new pull request, #72046: URL: https://github.com/apache/airflow/pull/72046
This PR adds the TypeScript writer portion of the integrity format discussed in #69905. `airflow-ts-pack` now emits a directly executable `bundle.mjs` with three physical regions: 1. a versioned `airflowBundle` header; 2. the existing Airflow metadata; and 3. the executable JavaScript. The header records fixed-width byte ranges and independent SHA-256 digests for the metadata and executable payloads. Keeping the encoding in a dedicated `bundle-encoder` module leaves `pack.ts` responsible for CLI handling, the esbuild run, and runtime-manifest collection. The digests let the coordinator detect accidental truncation or modification. They do not authenticate the bundle producer because someone able to replace the payload can also replace the header and its digests. This PR intentionally does not embed author-written source. Jason's [issue clarification](https://github.com/apache/airflow/issues/69905#issuecomment-5174764657) narrows the required precedent to the integrity-check idea rather than the complete AFBNDL01 feature set. The TypeScript SDK is not released, so this PR also adopts the layout-first format without preserving the previous metadata-first physical layout. A separate coordinator/spec PR will add reading, digest verification, corruption rejection, caching, and the formal Task SDK format documentation. Tests cover the versioned golden bundle, exact section order and offsets, metadata and executable digests, direct Node execution, shebang handling, metadata collection, malformed manifests, and failed builds. Related: #69905 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Codex Generated-by: Codex following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) --- * Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. Note: commit author/co-author name and email in commits become permanently public when merged. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
