fix(SUP-3268): harden ontology packaging and timezone precedence - #91
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughTwo bug fixes: timezone resolution in ChangesTimezone Resolution Precedence
Ontology Publish Allowlist and Fixture Relocation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 689f2e298d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| `ontology/index.md` is the layer map — read it first when navigating manually. | ||
| `schema/templates/index.md` is the blank layer map for new ontologies. The public | ||
| example fixture lives under `schema/examples/public-ontology/`; keep your filled-in | ||
| private ontology in a local `ontology/` directory outside published package files. |
There was a problem hiding this comment.
Ignore the new private ontology write target
When users follow this guidance or run existing defaults such as scripts/bootstrap.js/scripts/extract.js, the private files are created under modules/jarvos-ontology/ontology/, but I checked the repo and module ignore files and there is no .gitignore entry for that directory. Removing it from npm files prevents publication, but it still leaves private ontology data as untracked files that can be accidentally added to git; add an ignore rule for the live ontology/ target.
Useful? React with 👍 / 👎.
| || rest.user?.timezone | ||
| || rest.user?.timeZone | ||
| || rest.timezone | ||
| || rest.timeZone, | ||
| || rest.timeZone | ||
| || env.TZ, |
There was a problem hiding this comment.
Skip invalid config timezones before TZ fallback
With a configured but invalid timezone, for example user.timezone: "Not/A_Timezone", and a valid ambient TZ, this truthy || chain passes the invalid config value into validTimezone(), which returns America/New_York instead of trying the later TZ fallback. That regresses the fallback path for date-sensitive note/journal writers using resolveConfig().user.timezone; iterate candidates and validate each one before falling back.
Useful? React with 👍 / 👎.
Summary
TZbehind explicit jarvOS timezone config while preservingJARVOS_TIMEZONEand journal-maintenance-specific overridesschema/examples/public-ontology/and exclude liveontology/write targets from package allowlistsAutoreview finding dispositions
TZoverriding configured timezone: fixed. Configured user/global timezones now win over generic shell/CITZ;JARVOS_TIMEZONEremains the explicit env override.modules/jarvos-ontology/ontology/published while also serving as extractor default output: fixed. Public fixtures moved underschema/examples/public-ontology/; root and module package allowlists exclude live ontology output.Review of record
CE-review pass over this branch found no remaining actionable findings after the fixes above.
Verification
git diff --checknode --test modules/jarvos-secondbrain/tests/journal-maintenance-schedule.test.js modules/jarvos-secondbrain/tests/config-resolution.test.js modules/jarvos-secondbrain/tests/jarvos-paths-shim.test.js— 29 passnode --test modules/jarvos-ontology/test/*.test.js— 69 pass (existing Node MODULE_TYPELESS_PACKAGE_JSON warnings)node tests/modules-smoke-test.js— 72 checks / 0 failednpm test— passnpm pack --dry-run --json: live ontology files[], public example count6modules/jarvos-ontology npm pack --dry-run --json: live ontology files[], public example count6npm run release:drift— OKnpm run release:check:candidate— expected non-ready only becausev0.6.2tag already exists; all other checks passSummary by CodeRabbit