Skip to content

Commit 2f40d9a

Browse files
snapsynapseclaude
andcommitted
fix(build): make generated outputs reproducible to unbreak CI gate
The "Verify generated outputs are current" gate (added in f77c4da) rebuilds docs/ and demo/ and fails on any git diff. But build.js stamped `new Date()` into every output — meta.generated in the API JSONs, last_updated in agents.json, lastmod in the sitemap, and lastBuildDate in the RSS feed — so each rebuild produced a fresh timestamp and the gate could never pass. Source those timestamps from the freshest date in the data (last_verified / effective / timeline) via a single deterministic BUILD_DAY. Rebuilds are now byte-identical; the timeline past/future split and footer year derive from the same stamp. Regenerated docs/ and demo/, refreshed the build.js hash in MANIFEST.yaml. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d132760 commit 2f40d9a

23 files changed

Lines changed: 104 additions & 75 deletions

‎CHANGELOG.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ pattern.
1313
1414
## [Unreleased]
1515

16+
### Fixed
17+
- Made `scripts/build.js` output reproducible by sourcing generated-output timestamps (`meta.generated`, `agents.json` `last_updated`, sitemap `lastmod`, RSS `lastBuildDate`) from the freshest date in the data rather than wall-clock time. The "generated outputs are current" CI gate could never pass before, because each rebuild stamped a new `new Date()` into committed artifacts.
18+
1619
## [1.0.1] — 2026-05-30
1720

1821
### Added

‎MANIFEST.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ files:
7272

7373
- path: scripts/build.js
7474
role: tooling
75-
hash: sha256:c735180a53071ae90facd6ddf9641ff26e32906acaf2775e3cef1fe872e6af9e
75+
hash: sha256:8582144782273c2c6cca840912a2fd58d9b5b7c21d9b48eccd874d89f5e89dd0
7676
note: Static site generator
7777

7878
- path: scripts/validate.js

‎demo/agents.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"robots": "https://knowledge-as-code.com/demo/robots.txt"
108108
},
109109
"meta": {
110-
"last_updated": "2026-05-25",
110+
"last_updated": "2026-03-25",
111111
"built_with": "Knowledge as Code",
112112
"pattern_url": "https://knowledge-as-code.com/",
113113
"template_url": "https://github.com/snapsynapse/knowledge-as-code-template"

‎demo/api/v1/authorities.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"meta": {
3-
"generated": "2026-05-25T01:37:41.260Z",
3+
"generated": "2026-03-25T00:00:00.000Z",
44
"count": 2
55
},
66
"items": [

‎demo/api/v1/comparisons.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"meta": {
3-
"generated": "2026-05-25T01:37:41.261Z"
3+
"generated": "2026-03-25T00:00:00.000Z"
44
},
55
"comparisons": [
66
{

‎demo/api/v1/containers.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"meta": {
3-
"generated": "2026-05-25T01:37:41.260Z",
3+
"generated": "2026-03-25T00:00:00.000Z",
44
"count": 2
55
},
66
"items": [

‎demo/api/v1/index.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"meta": {
3-
"generated": "2026-05-25T01:37:41.261Z",
3+
"generated": "2026-03-25T00:00:00.000Z",
44
"version": "1.0",
55
"project": "example",
66
"ontology": {

‎demo/api/v1/mappings.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"meta": {
3-
"generated": "2026-05-25T01:37:41.260Z",
3+
"generated": "2026-03-25T00:00:00.000Z",
44
"count": 4
55
},
66
"items": [

‎demo/api/v1/matrix.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"meta": {
3-
"generated": "2026-05-25T01:37:41.261Z"
3+
"generated": "2026-03-25T00:00:00.000Z"
44
},
55
"matrix": {
66
"access-control": {

‎demo/api/v1/primaries.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"meta": {
3-
"generated": "2026-05-25T01:37:41.259Z",
3+
"generated": "2026-03-25T00:00:00.000Z",
44
"count": 3
55
},
66
"items": [

0 commit comments

Comments
 (0)