Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions config/codex-termux-release-manifest.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"canonical_package_name": "@bash0816/codex-termux",
"canonical_package_status": "published",
"public_distribution_status": "published",
"canonical_package_status": "ready_to_publish",
"public_distribution_status": "staged_for_publish",
"support_status": "active",
"latest_audited_version": "0.144.6",
"latest_candidate_version": "0.144.6",
"latest_candidate_version": "0.145.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the bundled release manifest synchronized

Update packages/codex-termux/config/codex-termux-release-manifest.json alongside this field. This commit leaves that bundled manifest at candidate 0.144.6 and ready_to_publish, despite scripts/update-codex-candidate-manifest.js and the version-watch workflow explicitly updating and committing both manifests together. Auto-stage later changes only the root manifest and package.json, while config/ is included in the npm package, so a subsequently published 0.145.0 candidate would carry stale candidate metadata.

Useful? React with 👍 / 👎.

"previous_stable_version": "0.144.5",
"candidate_state": "published",
"candidate_state_status": "ready_to_publish",
"audit_evidence_ref": "",
"source_repo": "openai/codex",
"source_ref": "rust-v0.144.6",
"source_ref": "rust-v0.145.0",
"tracked_versions": [
"0.141.0",
"0.140.0",
Expand Down Expand Up @@ -50,8 +50,8 @@
"rollback_policy": "Reinstall an explicit published version with npm to roll back.",
"distribution_strategy": "public-npm-package",
"audited_at": "2026-07-01T00:00:00+09:00",
"updated_at": "2026-07-20T08:19:50.604Z",
"build_run_id": "29701985280",
"source_sha": "5d1fbf26c43abc65a203928b2e31561cb039e06d",
"expected_build_run_id": "29701985280"
"updated_at": "2026-07-22T05:57:36.655Z",
"build_run_id": "29865539089",
"source_sha": "25af12f7e61572b0bc18ddb1008be543b91519b0",
"expected_build_run_id": "29865539089"
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"canonical_package_name": "@bash0816/codex-termux",
"canonical_package_status": "published",
"public_distribution_status": "published",
"canonical_package_status": "ready_to_publish",
"public_distribution_status": "staged_for_publish",
"support_status": "active",
"latest_audited_version": "0.144.6",
"latest_candidate_version": "0.144.6",
"latest_candidate_version": "0.145.0",
"previous_stable_version": "0.144.5",
"candidate_state": "published",
"candidate_state_status": "ready_to_publish",
Expand Down Expand Up @@ -38,7 +38,7 @@
"rollback_policy": "Reinstall an explicit published version with npm to roll back.",
"distribution_strategy": "public-npm-package",
"audited_at": "2026-07-01T00:00:00+09:00",
"updated_at": "2026-07-20T08:19:50.604Z",
"updated_at": "2026-07-22T05:57:36.655Z",
"platform": "android",
"arch": "arm64",
"planned_wrapper_package": {
Expand Down
2 changes: 1 addition & 1 deletion packages/codex-termux/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bash0816/codex-termux",
"version": "0.144.6",
"version": "0.145.0",
"description": "Termux wrapper package for OpenAI Codex",
"license": "GPL-3.0-only",
"repository": {
Expand Down
100 changes: 83 additions & 17 deletions scripts/update-codex-candidate-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,50 @@ function updateManifests({
fs.writeFileSync(packagePath, `${JSON.stringify(packageManifest, null, 2)}\n`);
}

/**
* Stage both root and package manifests to ready_to_publish after a
* successful build. Root manifest additionally records build provenance
* (build_run_id/source_ref/source_sha); package manifest schema does not
* carry those fields, so it is intentionally excluded from that part.
*
* @param {Object} opts
* @param {string} opts.rootPath - path to root manifest
* @param {string} opts.packagePath - path to package manifest
* @param {string} opts.buildRunId - build_run_id to record on root manifest
* @param {string} opts.sourceRef - source_ref to record on root manifest
* @param {string} opts.sourceSha - source_sha to record on root manifest
*/
function stageManifestsReadyToPublish({
rootPath,
packagePath,
buildRunId,
sourceRef,
sourceSha,
}) {
if (!rootPath || !packagePath || !buildRunId || !sourceRef || !sourceSha) {
throw new Error('All parameters (rootPath, packagePath, buildRunId, sourceRef, sourceSha) are required');
}

const updatedAt = new Date().toISOString();

const rootManifest = JSON.parse(fs.readFileSync(rootPath, 'utf8'));
rootManifest.build_run_id = String(buildRunId);
rootManifest.source_ref = sourceRef;
rootManifest.source_sha = sourceSha;
rootManifest.candidate_state_status = 'ready_to_publish';
rootManifest.canonical_package_status = 'ready_to_publish';
rootManifest.public_distribution_status = 'staged_for_publish';
rootManifest.updated_at = updatedAt;
fs.writeFileSync(rootPath, `${JSON.stringify(rootManifest, null, 2)}\n`);

const packageManifest = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
packageManifest.candidate_state_status = 'ready_to_publish';
packageManifest.canonical_package_status = 'ready_to_publish';
packageManifest.public_distribution_status = 'staged_for_publish';
packageManifest.updated_at = updatedAt;
fs.writeFileSync(packagePath, `${JSON.stringify(packageManifest, null, 2)}\n`);
}

// CLI interface
if (require.main === module) {
const repoRoot = path.resolve(__dirname, '..');
Expand All @@ -54,27 +98,49 @@ if (require.main === module) {

function usage() {
console.error('usage: node scripts/update-codex-candidate-manifest.js <candidate-version> <candidate-state>');
console.error(' node scripts/update-codex-candidate-manifest.js stage <build-run-id> <source-ref> <source-sha>');
process.exit(2);
}

const candidateVersion = process.argv[2];
const candidateState = process.argv[3];

if (!candidateVersion || !candidateState) {
usage();
}
const firstArg = process.argv[2];

try {
updateManifests({
rootPath: rootManifestPath,
packagePath: packageManifestPath,
candidateVersion,
candidateState,
});
} catch (err) {
console.error('Error updating manifests:', err.message);
process.exit(1);
if (firstArg === 'stage') {
if (process.argv.length !== 6) {
usage();
}
const buildRunId = process.argv[3];
const sourceRef = process.argv[4];
const sourceSha = process.argv[5];
try {
stageManifestsReadyToPublish({
rootPath: rootManifestPath,
packagePath: packageManifestPath,
buildRunId,
sourceRef,
sourceSha,
});
} catch (err) {
console.error('Error staging manifests:', err.message);
process.exit(1);
}
} else {
if (process.argv.length !== 4) {
usage();
}
const candidateVersion = process.argv[2];
const candidateState = process.argv[3];
try {
updateManifests({
rootPath: rootManifestPath,
packagePath: packageManifestPath,
candidateVersion,
candidateState,
});
} catch (err) {
console.error('Error updating manifests:', err.message);
process.exit(1);
}
}
}

module.exports = { updateManifests };
module.exports = { updateManifests, stageManifestsReadyToPublish };