feat(fonts): ship NV fonts and make Libron default#700
Conversation
bc70b4d to
056f8a7
Compare
WalkthroughThis change adds Sequence Diagram(s)sequenceDiagram
participant Build as Build workflow
participant Cache as cache-fonts action
participant Xtask as cargo xtask download-fonts
participant Sources as Font sources
participant Fonts as fonts directory
Build->>Cache: restore bundled-fonts cache
Cache->>Xtask: run on cache miss
Xtask->>Sources: download or reuse archives and submodules
Sources->>Fonts: install bundled font files
Cache-->>Build: provide fonts directory
Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
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 |
056f8a7 to
71999b6
Compare
71999b6 to
3e9fc91
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (4)
docs/src/fonts.md (1)
1-143: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRegenerate the POT translation template.
This PR adds
docs/src/fonts.mdand modifiesdocs/src/SUMMARY.md,docs/src/contributing/devenv-setup.md, anddocs/src/settings/index.md— all English documentation sources underdocs/src/**/*.md. Per coding guidelines, the POT file must be regenerated when any such source is modified. Runcadmus-translate(available in devenv) to generate the updated.potfile and include it in this PR.As per coding guidelines: "When any English documentation source under
docs/src/**/*.mdis modified, regenerate the POT file."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/src/fonts.md` around lines 1 - 143, Regenerate the documentation translation POT template using the cadmus-translate command available in the development environment, covering the modified English sources including docs/src/fonts.md and the other changed documentation files. Include the resulting updated .pot file in the changes.Source: Coding guidelines
xtask/src/tasks/download_fonts/font/google.rs (1)
7-9: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueKeep
SUBMODULEprivate. It’s only used withinxtask/src/tasks/download_fonts/font/google.rs, sopubjust widens the API for no benefit.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@xtask/src/tasks/download_fonts/font/google.rs` around lines 7 - 9, Make the SUBMODULE constant private by removing its public visibility modifier, keeping its value and existing internal uses unchanged.Source: Coding guidelines
xtask/src/tasks/download_fonts/font/ebook.rs (1)
60-60: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider early-returning when fonts are already complete.
Unlike
source_code::install,ebook::installdoesn't checkis_completebefore proceeding. This means it always processes archives (even if just from cache) and iterates zip entries even when all fonts are already present and the version marker matches. Adding an early return would make the behavior consistent across sources and avoid unnecessary I/O.♻️ Proposed refactor
pub fn install(root: &Path, fonts_dir: &Path) -> Result<()> { + if is_complete(fonts_dir) { + return Ok(()); + } + let cache_dir = root.join(format!(".cache/ebook-fonts/{EBOOK_FONTS_VERSION}"));🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@xtask/src/tasks/download_fonts/font/ebook.rs` at line 60, Update ebook::install to check is_complete before processing cached archives or iterating ZIP entries, and return success immediately when the fonts are already complete. Preserve the existing installation flow for incomplete font sets, matching source_code::install’s behavior.xtask/src/tasks/util/github.rs (1)
27-27: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep these new APIs crate-private unless they are intentional external contracts.
xtask/src/tasks/util/github.rs#L27-L27: usepub(crate)forclientif font downloaders are its only consumers.crates/core/src/font/mod.rs#L605-L608: usepub(crate)forfrom_name_in_pathsifEngineis its only non-documentation caller.Confirm external usage before retaining
pub. As per coding guidelines, “Use the most restrictive visibility that works.”🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@xtask/src/tasks/util/github.rs` at line 27, Restrict the visibility of client in github.rs to pub(crate) if font downloaders are its only consumers, and restrict from_name_in_paths in font/mod.rs to pub(crate) if Engine is its only non-documentation caller; first confirm neither API is used externally, retaining pub only for intentional external contracts.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.gitmodules:
- Around line 61-64: Update the thirdparty/google-fonts submodule configuration
and its setup flow so fresh checkouts fetch only the four font files consumed by
the download_fonts Google font task, using a smaller package or sparse/partial
checkout rather than the full upstream repository. Preserve the existing paths
expected by the task and avoid changing unrelated submodules.
In `@renovate.json`:
- Around line 220-224: Update the Renovate rule for alerque/libertinus,
identified by depNameTemplate, to use semver-coerced instead of strict semver so
versions such as v7.051 are handled correctly. Keep the existing datasource and
dependency extraction configuration unchanged.
In `@xtask/src/tasks/download_fonts/font/ebook.rs`:
- Around line 60-73: Update install around the EBOOK_FONTS_VERSION marker so
that when the existing version does not match, remove the previously installed
ebook font files from fonts_dir before extracting the cached archives. Preserve
existing files when the marker already matches, and only call
markers::mark_version after both archives are successfully extracted.
In `@xtask/src/tasks/download_fonts/font/google.rs`:
- Around line 24-29: Make Google-font installation revision-aware by updating
is_complete to validate the recorded thirdparty/google-fonts submodule revision
in addition to destination-file existence, and update install to refresh or
rebuild the fonts when that revision changes instead of relying on
util::install_from_submodule’s existing-file skip behavior. Preserve the current
completion behavior when both files and the recorded revision match.
In `@xtask/src/tasks/download_fonts/font/libertinus.rs`:
- Around line 37-53: Update the archive handling around the `archive.exists()`
check and `fs::extract_zip_entries_flat` so corrupt or partially written cached
archives are not reused: download to a temporary path and rename it to `archive`
only after a successful download, or remove the cached archive and re-fetch when
extraction fails. Preserve the existing cache reuse behavior for valid archives.
---
Nitpick comments:
In `@docs/src/fonts.md`:
- Around line 1-143: Regenerate the documentation translation POT template using
the cadmus-translate command available in the development environment, covering
the modified English sources including docs/src/fonts.md and the other changed
documentation files. Include the resulting updated .pot file in the changes.
In `@xtask/src/tasks/download_fonts/font/ebook.rs`:
- Line 60: Update ebook::install to check is_complete before processing cached
archives or iterating ZIP entries, and return success immediately when the fonts
are already complete. Preserve the existing installation flow for incomplete
font sets, matching source_code::install’s behavior.
In `@xtask/src/tasks/download_fonts/font/google.rs`:
- Around line 7-9: Make the SUBMODULE constant private by removing its public
visibility modifier, keeping its value and existing internal uses unchanged.
In `@xtask/src/tasks/util/github.rs`:
- Line 27: Restrict the visibility of client in github.rs to pub(crate) if font
downloaders are its only consumers, and restrict from_name_in_paths in
font/mod.rs to pub(crate) if Engine is its only non-documentation caller; first
confirm neither API is used externally, retaining pub only for intentional
external contracts.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: f0bff0b7-2e86-4741-9813-8785f32877f4
⛔ Files ignored due to path filters (19)
docs/po/messages.potis excluded by!docs/po/messages.potfonts/Cormorant-Regular.ttfis excluded by!**/*.ttffonts/Delius-Regular.ttfis excluded by!**/*.ttffonts/LibertinusSerif-Bold.otfis excluded by!**/*.otffonts/LibertinusSerif-BoldItalic.otfis excluded by!**/*.otffonts/LibertinusSerif-Italic.otfis excluded by!**/*.otffonts/LibertinusSerif-Regular.otfis excluded by!**/*.otffonts/NotoSans-Bold.ttfis excluded by!**/*.ttffonts/NotoSans-BoldItalic.ttfis excluded by!**/*.ttffonts/NotoSans-Italic.ttfis excluded by!**/*.ttffonts/NotoSans-Regular.ttfis excluded by!**/*.ttffonts/NotoSerif-Bold.ttfis excluded by!**/*.ttffonts/NotoSerif-BoldItalic.ttfis excluded by!**/*.ttffonts/NotoSerif-Italic.ttfis excluded by!**/*.ttffonts/NotoSerif-Regular.ttfis excluded by!**/*.ttffonts/Parisienne-Regular.ttfis excluded by!**/*.ttffonts/SourceCodeVariable-Italic.otfis excluded by!**/*.otffonts/SourceCodeVariable-Roman.otfis excluded by!**/*.otffonts/VarelaRound-Regular.ttfis excluded by!**/*.ttf
📒 Files selected for processing (34)
.agents/skills/build-cadmus-native/SKILL.md.github/actions/build-kobo/action.yml.github/actions/cache-fonts/action.yml.github/workflows/cargo.yml.gitignore.gitmodulescontrib/Settings-sample.tomlcrates/build-deps/src/markers.rscrates/core/src/document/html/engine.rscrates/core/src/font/mod.rscrates/core/src/ota/cleanup.rscrates/core/src/settings/mod.rscrates/core/src/view/reader/mod.rsdevenv.nixdocs/src/SUMMARY.mddocs/src/contributing/devenv-setup.mddocs/src/fonts.mddocs/src/settings/index.mdrenovate.jsonthirdparty/google-fontsthirdparty/noto-fontsxtask/src/lib.rsxtask/src/tasks/dist.rsxtask/src/tasks/download_fonts/font/ebook.rsxtask/src/tasks/download_fonts/font/google.rsxtask/src/tasks/download_fonts/font/libertinus.rsxtask/src/tasks/download_fonts/font/mod.rsxtask/src/tasks/download_fonts/font/noto.rsxtask/src/tasks/download_fonts/font/source_code.rsxtask/src/tasks/download_fonts/mod.rsxtask/src/tasks/download_fonts/util.rsxtask/src/tasks/mod.rsxtask/src/tasks/util/fs.rsxtask/src/tasks/util/github.rs
📜 Review details
⚠️ CI failures not shown inline (1)
GitHub Actions: Prepare Copilot Agent Environment / 0_Prepare Copilot Agent Environment.txt: feat(fonts): ship NV fonts and make Libron default
Conclusion: failure
##[group]GITHUB_TOKEN Permissions
Contents: read
Metadata: read
##[endgroup]
Secret source: Actions
Prepare workflow directory
Prepare all required actions
Getting action download info
Failed to resolve action download info. Error: Service Unavailable
Retrying in 11.505 seconds
Failed to resolve action download info. Error: Service Unavailable
Retrying in 15.237 seconds
##[error]Service Unavailable
🧰 Additional context used
📓 Path-based instructions (12)
**/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
**/*.rs: The emulator code path should panic on errors, while the app code path should handle errors gracefully.
Prefer?overunwrap()orexpect()in library and app Rust code.
Usethiserrorfor custom error types andanyhowfor ad-hoc errors.
Prefer iterators over index-based loops.
Use&strinstead ofStringin function parameters when ownership is not needed.
Prefer borrowing over cloning.
Inline expressions directly into struct fields instead of introducing intermediate bindings solely for a struct literal.
Avoidunsafeunless it is required and documented.
Avoid prematurecollect()calls and keep iterators lazy.
Ensure Rust code compiles without warnings.
Use the most restrictive visibility that works: prefer privatemodoverpub mod,pub(crate)overpub, and expose items publicly only when non-documentation code outside the parent module uses them.
Before accepting newpubitems, check for external non-documentation usage with imports or fully qualified paths.
Prefer newtype wrappers over raw primitives when values represent domain concepts.
ImplementDisplay,FromStr, and other appropriate standard traits on newtypes to keep them ergonomic.
Match on enum variants instead of comparing strings.
Comments should explain why, not what; avoid inline comments, commented-out code, changelog comments, and divider comments. ContextualTODO,FIXME,HACK, andNOTEannotations are allowed.
Use structured fields with thetracingcrate; never put log data in formatted strings, use no module prefixes, and do not mix structured fields with format arguments.
Usedebugfor development detail,infofor important runtime events,warnfor recoverable issues, anderrorfor failures requiring attention.
Return domain types directly fromsqlxqueries instead of parsing primitives afterward.
Implementsqlx::Type,Encode, andDecodefor owned newtypes used in SQLite query results, delegating to the inner primitive.
Use sqlx t...
Files:
xtask/src/tasks/dist.rsxtask/src/tasks/mod.rscrates/core/src/settings/mod.rsxtask/src/tasks/download_fonts/util.rsxtask/src/tasks/download_fonts/font/mod.rsxtask/src/tasks/download_fonts/font/google.rsxtask/src/tasks/util/github.rsxtask/src/tasks/download_fonts/mod.rsxtask/src/lib.rsxtask/src/tasks/download_fonts/font/source_code.rsxtask/src/tasks/download_fonts/font/noto.rsxtask/src/tasks/download_fonts/font/libertinus.rscrates/core/src/font/mod.rsxtask/src/tasks/download_fonts/font/ebook.rscrates/core/src/ota/cleanup.rscrates/core/src/view/reader/mod.rscrates/build-deps/src/markers.rscrates/core/src/document/html/engine.rsxtask/src/tasks/util/fs.rs
**/*.{rs,toml,yml,yaml}
📄 CodeRabbit inference engine (AGENTS.md)
All feature combinations run on
ubuntu-latest; onlydefaultandtestfeatures produce build artifacts.
Files:
xtask/src/tasks/dist.rsxtask/src/tasks/mod.rscrates/core/src/settings/mod.rsxtask/src/tasks/download_fonts/util.rsxtask/src/tasks/download_fonts/font/mod.rsxtask/src/tasks/download_fonts/font/google.rscontrib/Settings-sample.tomlxtask/src/tasks/util/github.rsxtask/src/tasks/download_fonts/mod.rsxtask/src/lib.rsxtask/src/tasks/download_fonts/font/source_code.rsxtask/src/tasks/download_fonts/font/noto.rsxtask/src/tasks/download_fonts/font/libertinus.rscrates/core/src/font/mod.rsxtask/src/tasks/download_fonts/font/ebook.rscrates/core/src/ota/cleanup.rscrates/core/src/view/reader/mod.rscrates/build-deps/src/markers.rscrates/core/src/document/html/engine.rsxtask/src/tasks/util/fs.rs
**/*.{rs,tsx,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
When testing strings rendered through
fl!, construct expected strings withfl!as well.
Files:
xtask/src/tasks/dist.rsxtask/src/tasks/mod.rscrates/core/src/settings/mod.rsxtask/src/tasks/download_fonts/util.rsxtask/src/tasks/download_fonts/font/mod.rsxtask/src/tasks/download_fonts/font/google.rsxtask/src/tasks/util/github.rsxtask/src/tasks/download_fonts/mod.rsxtask/src/lib.rsxtask/src/tasks/download_fonts/font/source_code.rsxtask/src/tasks/download_fonts/font/noto.rsxtask/src/tasks/download_fonts/font/libertinus.rscrates/core/src/font/mod.rsxtask/src/tasks/download_fonts/font/ebook.rscrates/core/src/ota/cleanup.rscrates/core/src/view/reader/mod.rscrates/build-deps/src/markers.rscrates/core/src/document/html/engine.rsxtask/src/tasks/util/fs.rs
docs/src/**/*.md
📄 CodeRabbit inference engine (docs/REVIEW.md)
When any English documentation source under
docs/src/**/*.mdis modified, regenerate the POT file.
docs/src/**/*.md: Format and lint Markdown documentation withrumdlviatreefmt; use code blocks with language tags, and preserve documentation Markdown from Prettier formatting.
Use the supported mdBook admonition syntax:[!NOTE],[!TIP],[!IMPORTANT],[!WARNING], and[!CAUTION].
When linking to Cargo-generated API pages, use absolute HTML links such as/api/cadmus_core/...; do not use relative Markdown links.
Do not embed locale prefixes such asen/in API Markdown links; use unprefixed/api/...site routes.
Use conversational, friendly, active-voice language and avoid jargon in user-facing documentation.
Files:
docs/src/SUMMARY.mddocs/src/settings/index.mddocs/src/contributing/devenv-setup.mddocs/src/fonts.md
docs/**/*.md
📄 CodeRabbit inference engine (docs/REVIEW.md)
docs/**/*.md: Format Markdown files with Prettier.
Ensure Markdown files pass rumdl according to.rumdl.toml.
Files:
docs/src/SUMMARY.mddocs/src/settings/index.mddocs/src/contributing/devenv-setup.mddocs/src/fonts.md
crates/core/**/*.rs
📄 CodeRabbit inference engine (crates/core/REVIEW.md)
crates/core/**/*.rs: Do not use"string literal".to_string()orformat!("literal")for user-visible text.
Thefl!macro must be used at every call site for user-visible text.
crates/core/**/*.rs: Allhandle_eventandrendermethods in view components must use the specified OpenTelemetry#[cfg_attr(feature = "tracing", tracing::instrument(...))]instrumentation.
Instrumentationskip()names must exactly match the method parameter names, including underscore prefixes.
Verify tracing instrumentation withcargo check --features tracing.
A view'srender()is called only when it has no children or is a background view; container views with children are not rendered directly.
For container decoration, use a background view for content rendered before children, or a dedicated child view for overlays rendered in child order.
Rustdoc examples should prefer fully compilable examples, thenno_run, and useignoreonly for private orpub(crate)items unreachable from the test harness, with an explanatory comment.
Use#to hide Rustdoc example boilerplate and verify examples withcargo test --doc.
Use typed SQLx macros:sqlx::query!,sqlx::query_as!, andsqlx::query_scalar!; do not use untyped query functions.
Use.flatten()onquery_scalar!results for nullable columns producingOption<Option<T>>.
Untyped SQLx queries are permitted for dynamic SQL only when unit tests cover every dynamic path and a comment explains why a typed macro cannot be used.
All user-visible strings must usefl!withuse crate::fl;; do not hardcode labels, buttons, placeholders, notifications, or other user-facing text.
Pass Fluent variable values at call sites usingfl!("id", var = value).
Apply localization toSettingKindlabels,Event::OpenNamedInputlabels, menu entry text, button labels, notification text, and all other user-visible strings.
Files:
crates/core/src/settings/mod.rscrates/core/src/font/mod.rscrates/core/src/ota/cleanup.rscrates/core/src/view/reader/mod.rscrates/core/src/document/html/engine.rs
.agents/skills/**
📄 CodeRabbit inference engine (AGENTS.md)
For workflows, load the matching skill from
.agents/skills/before performing native builds, Kobo builds, formatting, linting, sqlx regeneration, documentation, translation synchronization, or log lookup.
Files:
.agents/skills/build-cadmus-native/SKILL.md
docs/src/!(contributing)/**/*.md
📄 CodeRabbit inference engine (docs/AGENTS.md)
User-facing documentation must target end users with no technical background using Cadmus.
Files:
docs/src/settings/index.md
docs/src/contributing/**/*.md
📄 CodeRabbit inference engine (docs/AGENTS.md)
Contributor documentation may use technical terminology, should be clear and direct, should include code examples where helpful, and must document setup steps precisely.
Files:
docs/src/contributing/devenv-setup.md
.github/workflows/cargo.yml
📄 CodeRabbit inference engine (REVIEW.md)
.github/workflows/cargo.yml: When adding a new Cargo feature flag, verify that.github/workflows/cargo.ymlhas new matrix entries in bothclippyandtestjobs for the feature alone and in combination with every other feature
Ensure feature flag test coverage is not limited to--all-featuresalone; paths marked with#[cfg(not(feature = "..."))]must be tested individually in CI matrix
Files:
.github/workflows/cargo.yml
**/.github/workflows/cargo.yml
📄 CodeRabbit inference engine (AGENTS.md)
When adding a feature flag, add matrix entries to both
clippyandtestjobs for the feature alone and every combination with other features.
Files:
.github/workflows/cargo.yml
.github/workflows/**
📄 CodeRabbit inference engine (AGENTS.md)
In CI, run
cargo xtask download-assetsbeforecargo xtask build-koboso generated asset lists remain accurate.
Files:
.github/workflows/cargo.yml
🧠 Learnings (2)
📚 Learning: 2026-05-31T07:53:12.579Z
Learnt from: OGKevin
Repo: OGKevin/cadmus PR: 553
File: docs/src/installation/migration.md:87-88
Timestamp: 2026-05-31T07:53:12.579Z
Learning: For markdown files under docs/src/ in the cadmus (OGKevin/cadmus) repo, validate mdBook admonition syntax using the allowed types: NOTE, TIP, WARNING, IMPORTANT, and CAUTION. The correct format is a blockquote prefix like `> [!NOTE]`, `> [!TIP]`, `> [!WARNING]`, `> [!IMPORTANT]`, or `> [!CAUTION]`. Do not flag `[!CAUTION]` or `[!IMPORTANT]` as non-standard in this repo.
Applied to files:
docs/src/SUMMARY.mddocs/src/settings/index.mddocs/src/contributing/devenv-setup.mddocs/src/fonts.md
📚 Learning: 2026-05-23T14:57:43.820Z
Learnt from: OGKevin
Repo: OGKevin/cadmus PR: 478
File: crates/core/src/view/settings_editor/refresh_rate_by_kind_editor.rs:91-91
Timestamp: 2026-05-23T14:57:43.820Z
Learning: When reviewing Rust code that calls `ToggleableKeyboard::new(parent_rect: Rectangle, number_mode: bool)` (from `crates/core/src/view/toggleable_keyboard.rs`), treat the second argument as `number_mode` (numeric/number-layout mode), not as an initial visibility flag. In the constructor implementation, `visible` is initialized to `false` and the keyboard starts hidden; only the numeric layout changes based on `number_mode` (e.g., for numeric inputs like `refresh rate u8`). Therefore, do not flag `ToggleableKeyboard::new(rect, true)` as “making the keyboard start visible.”
Applied to files:
crates/core/src/settings/mod.rscrates/core/src/font/mod.rscrates/core/src/ota/cleanup.rscrates/core/src/view/reader/mod.rscrates/core/src/document/html/engine.rs
🪛 SkillSpector (2.3.11)
.agents/skills/build-cadmus-native/SKILL.md
[warning] 50: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 52: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 53: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 61: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 113: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 113: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 113: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
🔇 Additional comments (33)
.agents/skills/build-cadmus-native/SKILL.md (1)
36-42: LGTM!contrib/Settings-sample.toml (1)
169-169: LGTM!devenv.nix (1)
405-405: LGTM!docs/src/SUMMARY.md (1)
13-13: LGTM!docs/src/contributing/devenv-setup.md (1)
27-34: LGTM!Also applies to: 53-53, 100-100
docs/src/fonts.md (1)
1-143: LGTM!docs/src/settings/index.md (1)
281-327: LGTM!crates/build-deps/src/markers.rs (1)
91-92: LGTM!Also applies to: 94-102, 103-111
thirdparty/google-fonts (1)
1-1: LGTM!xtask/src/tasks/download_fonts/font/google.rs (1)
1-6: LGTM!Also applies to: 11-22
crates/core/src/settings/mod.rs (1)
123-123: LGTM!crates/core/src/view/reader/mod.rs (2)
2711-2713: LGTM!
3370-3370: 🎯 Functional CorrectnessVerify the unconditional font path against the bundled resolver.
This now passes only
context.settings.reader.font_path. Selecting a family discovered incontext.device.install_path("fonts")works only ifHtmlDocument::set_font_familysearches bundled fonts independently of that argument. Confirm the paired change incrates/core/src/document/html/engine.rsand retain a test covering bundled-family selection.Based on the supplied cross-layer summary, this is a contract check rather than a confirmed defect.
crates/core/src/ota/cleanup.rs (1)
86-94: LGTM!.gitignore (1)
19-19: LGTM!thirdparty/noto-fonts (1)
1-1: LGTM!xtask/src/lib.rs (1)
29-29: LGTM!Also applies to: 85-86, 114-114
xtask/src/tasks/mod.rs (1)
14-14: LGTM!xtask/src/tasks/download_fonts/mod.rs (2)
33-55: LGTM!
22-24: LGTM!xtask/src/tasks/dist.rs (1)
129-136: LGTM!xtask/src/tasks/download_fonts/font/mod.rs (1)
29-46: LGTM!xtask/src/tasks/download_fonts/font/noto.rs (1)
43-49: LGTM!xtask/src/tasks/download_fonts/font/source_code.rs (1)
30-56: LGTM!.github/actions/build-kobo/action.yml (1)
52-55: LGTM!.github/actions/cache-fonts/action.yml (2)
35-56: LGTM!
28-33: 🗄️ Data Integrity & IntegrationNo Libertinus gitlink to add here.
libertinusis archive-based, andxtask/src/tasks/download_fonts/**already feeds the cache key, so this hash only needs the Noto and Google submodules.> Likely an incorrect or invalid review comment..github/workflows/cargo.yml (1)
46-46: LGTM!Also applies to: 190-194, 370-374
xtask/src/tasks/download_fonts/util.rs (1)
21-51: LGTM!xtask/src/tasks/util/fs.rs (1)
292-389: LGTM!Also applies to: 510-644
renovate.json (1)
68-80: LGTM!crates/core/src/document/html/engine.rs (1)
37-37: LGTM!Also applies to: 105-116, 147-154, 2472-2504
crates/core/src/font/mod.rs (1)
619-690: LGTM!Also applies to: 2805-2838
This commit adds KF https://github.com/nicoverbruggen/ebook-fonts and makes it the default font. It also removes the fonts from git and adds a new xtask command to fetch from from source. Change-Id: 0dcf4dea1fd43e8544047d0afe59fe22 Change-Id-Short: zmnkvmlpykmv
221103a to
d491cdb
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
xtask/src/tasks/util/github.rs (2)
160-161: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuePreserve the original file extension for the temp file.
Hey there! Using
with_extension("part")replaces the existing extension entirely (for example,fonts.zipbecomesfonts.part). While this is completely fine for our current sequentialxtaskdownloads, it might be slightly safer to append.partto the existing filename so we don't accidentally lose the original file type or cause collisions in the future. Feel free to tweak it if you like!✨ Proposed tweak
- let temp = dest.with_extension("part"); + let temp = dest.with_file_name(format!("{}.part", dest.file_name().unwrap_or_default().to_string_lossy()));🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@xtask/src/tasks/util/github.rs` around lines 160 - 161, Update the temporary-path construction in the download logic around dest so it appends a “.part” suffix to the complete original filename instead of replacing its extension, preserving names such as “fonts.zip” as “fonts.zip.part”.
27-27: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuePrefer
pub(crate)overpubfor internal items.Hey! I noticed several functions across the
xtasktasks were opened up aspub. As per our coding guidelines, we should use the most restrictive visibility that works, preferringpub(crate)overpubfor items that are only meant to be used within the same parent crate. Since these are all internal build helpers, let's dial them down!
xtask/src/tasks/util/github.rs#L27-L27: changepub fn clienttopub(crate) fn client.xtask/src/tasks/download_fonts/font/google.rs#L23-L23: changepub fn is_completetopub(crate) fn is_complete.xtask/src/tasks/download_fonts/font/google.rs#L27-L27: changepub fn installtopub(crate) fn install.xtask/src/tasks/download_fonts/font/noto.rs#L42-L42: changepub fn is_completetopub(crate) fn is_complete.xtask/src/tasks/download_fonts/font/noto.rs#L46-L46: changepub fn installtopub(crate) fn install.xtask/src/tasks/download_fonts/util.rs#L20-L20: changepub fn is_submodule_install_currenttopub(crate) fn is_submodule_install_current.xtask/src/tasks/download_fonts/util.rs#L43-L43: changepub fn install_from_submoduletopub(crate) fn install_from_submodule.xtask/src/tasks/download_fonts/util.rs#L102-L102: changepub fn ensure_cached_release_assettopub(crate) fn ensure_cached_release_asset.xtask/src/tasks/download_fonts/util.rs#L136-L136: changepub fn extract_cached_archivetopub(crate) fn extract_cached_archive.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@xtask/src/tasks/util/github.rs` at line 27, Restrict these internal xtask helpers to crate visibility by changing `client` in `xtask/src/tasks/util/github.rs`, `is_complete` and `install` in `xtask/src/tasks/download_fonts/font/google.rs`, `is_complete` and `install` in `xtask/src/tasks/download_fonts/font/noto.rs`, and `is_submodule_install_current`, `install_from_submodule`, `ensure_cached_release_asset`, and `extract_cached_archive` in `xtask/src/tasks/download_fonts/util.rs` from `pub` to `pub(crate)`; no other behavior changes are needed.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.agents/skills/build-cadmus-native/SKILL.md:
- Around line 36-42: Clarify the asset setup section around the
`download-assets` and `download-fonts` commands: either rename the “optional”
section to reflect that both commands are required for Kobo builds, or split the
emulator-only guidance from the mandatory Kobo prerequisites. Ensure the
resulting text clearly distinguishes required commands from optional setup so
developers do not skip them.
---
Nitpick comments:
In `@xtask/src/tasks/util/github.rs`:
- Around line 160-161: Update the temporary-path construction in the download
logic around dest so it appends a “.part” suffix to the complete original
filename instead of replacing its extension, preserving names such as
“fonts.zip” as “fonts.zip.part”.
- Line 27: Restrict these internal xtask helpers to crate visibility by changing
`client` in `xtask/src/tasks/util/github.rs`, `is_complete` and `install` in
`xtask/src/tasks/download_fonts/font/google.rs`, `is_complete` and `install` in
`xtask/src/tasks/download_fonts/font/noto.rs`, and
`is_submodule_install_current`, `install_from_submodule`,
`ensure_cached_release_asset`, and `extract_cached_archive` in
`xtask/src/tasks/download_fonts/util.rs` from `pub` to `pub(crate)`; no other
behavior changes are needed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 404a3442-dbfc-40cc-8904-c7362eccad97
⛔ Files ignored due to path filters (19)
docs/po/messages.potis excluded by!docs/po/messages.potfonts/Cormorant-Regular.ttfis excluded by!**/*.ttffonts/Delius-Regular.ttfis excluded by!**/*.ttffonts/LibertinusSerif-Bold.otfis excluded by!**/*.otffonts/LibertinusSerif-BoldItalic.otfis excluded by!**/*.otffonts/LibertinusSerif-Italic.otfis excluded by!**/*.otffonts/LibertinusSerif-Regular.otfis excluded by!**/*.otffonts/NotoSans-Bold.ttfis excluded by!**/*.ttffonts/NotoSans-BoldItalic.ttfis excluded by!**/*.ttffonts/NotoSans-Italic.ttfis excluded by!**/*.ttffonts/NotoSans-Regular.ttfis excluded by!**/*.ttffonts/NotoSerif-Bold.ttfis excluded by!**/*.ttffonts/NotoSerif-BoldItalic.ttfis excluded by!**/*.ttffonts/NotoSerif-Italic.ttfis excluded by!**/*.ttffonts/NotoSerif-Regular.ttfis excluded by!**/*.ttffonts/Parisienne-Regular.ttfis excluded by!**/*.ttffonts/SourceCodeVariable-Italic.otfis excluded by!**/*.otffonts/SourceCodeVariable-Roman.otfis excluded by!**/*.otffonts/VarelaRound-Regular.ttfis excluded by!**/*.ttf
📒 Files selected for processing (34)
.agents/skills/build-cadmus-native/SKILL.md.github/actions/build-kobo/action.yml.github/actions/cache-fonts/action.yml.github/workflows/cargo.yml.gitignore.gitmodulescontrib/Settings-sample.tomlcrates/build-deps/src/markers.rscrates/core/src/document/html/engine.rscrates/core/src/font/mod.rscrates/core/src/ota/cleanup.rscrates/core/src/settings/mod.rscrates/core/src/view/reader/mod.rsdevenv.nixdocs/src/SUMMARY.mddocs/src/contributing/devenv-setup.mddocs/src/fonts.mddocs/src/settings/index.mdrenovate.jsonthirdparty/google-fontsthirdparty/noto-fontsxtask/src/lib.rsxtask/src/tasks/dist.rsxtask/src/tasks/download_fonts/font/ebook.rsxtask/src/tasks/download_fonts/font/google.rsxtask/src/tasks/download_fonts/font/libertinus.rsxtask/src/tasks/download_fonts/font/mod.rsxtask/src/tasks/download_fonts/font/noto.rsxtask/src/tasks/download_fonts/font/source_code.rsxtask/src/tasks/download_fonts/mod.rsxtask/src/tasks/download_fonts/util.rsxtask/src/tasks/mod.rsxtask/src/tasks/util/fs.rsxtask/src/tasks/util/github.rs
🚧 Files skipped from review as they are similar to previous changes (25)
- .gitignore
- thirdparty/google-fonts
- .gitmodules
- docs/src/SUMMARY.md
- .github/actions/cache-fonts/action.yml
- xtask/src/tasks/mod.rs
- xtask/src/tasks/download_fonts/font/mod.rs
- docs/src/fonts.md
- contrib/Settings-sample.toml
- .github/actions/build-kobo/action.yml
- xtask/src/tasks/download_fonts/mod.rs
- xtask/src/tasks/download_fonts/font/libertinus.rs
- devenv.nix
- thirdparty/noto-fonts
- docs/src/settings/index.md
- crates/core/src/settings/mod.rs
- crates/core/src/font/mod.rs
- .github/workflows/cargo.yml
- xtask/src/lib.rs
- xtask/src/tasks/download_fonts/font/source_code.rs
- crates/build-deps/src/markers.rs
- xtask/src/tasks/util/fs.rs
- xtask/src/tasks/download_fonts/font/ebook.rs
- crates/core/src/document/html/engine.rs
- crates/core/src/view/reader/mod.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (8)
**/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
**/*.rs: The emulator code path should panic on errors, while the app code path should handle errors gracefully.
Prefer?overunwrap()orexpect()in library and app Rust code.
Usethiserrorfor custom error types andanyhowfor ad-hoc errors.
Prefer iterators over index-based loops.
Use&strinstead ofStringin function parameters when ownership is not needed.
Prefer borrowing over cloning.
Inline expressions directly into struct fields instead of introducing intermediate bindings solely for a struct literal.
Avoidunsafeunless it is required and documented.
Avoid prematurecollect()calls and keep iterators lazy.
Ensure Rust code compiles without warnings.
Use the most restrictive visibility that works: prefer privatemodoverpub mod,pub(crate)overpub, and expose items publicly only when non-documentation code outside the parent module uses them.
Before accepting newpubitems, check for external non-documentation usage with imports or fully qualified paths.
Prefer newtype wrappers over raw primitives when values represent domain concepts.
ImplementDisplay,FromStr, and other appropriate standard traits on newtypes to keep them ergonomic.
Match on enum variants instead of comparing strings.
Comments should explain why, not what; avoid inline comments, commented-out code, changelog comments, and divider comments. ContextualTODO,FIXME,HACK, andNOTEannotations are allowed.
Use structured fields with thetracingcrate; never put log data in formatted strings, use no module prefixes, and do not mix structured fields with format arguments.
Usedebugfor development detail,infofor important runtime events,warnfor recoverable issues, anderrorfor failures requiring attention.
Return domain types directly fromsqlxqueries instead of parsing primitives afterward.
Implementsqlx::Type,Encode, andDecodefor owned newtypes used in SQLite query results, delegating to the inner primitive.
Use sqlx t...
Files:
xtask/src/tasks/download_fonts/font/google.rsxtask/src/tasks/download_fonts/font/noto.rsxtask/src/tasks/util/github.rsxtask/src/tasks/dist.rsxtask/src/tasks/download_fonts/util.rscrates/core/src/ota/cleanup.rs
**/*.{rs,toml,yml,yaml}
📄 CodeRabbit inference engine (AGENTS.md)
All feature combinations run on
ubuntu-latest; onlydefaultandtestfeatures produce build artifacts.
Files:
xtask/src/tasks/download_fonts/font/google.rsxtask/src/tasks/download_fonts/font/noto.rsxtask/src/tasks/util/github.rsxtask/src/tasks/dist.rsxtask/src/tasks/download_fonts/util.rscrates/core/src/ota/cleanup.rs
**/*.{rs,tsx,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
When testing strings rendered through
fl!, construct expected strings withfl!as well.
Files:
xtask/src/tasks/download_fonts/font/google.rsxtask/src/tasks/download_fonts/font/noto.rsxtask/src/tasks/util/github.rsxtask/src/tasks/dist.rsxtask/src/tasks/download_fonts/util.rscrates/core/src/ota/cleanup.rs
docs/src/**/*.md
📄 CodeRabbit inference engine (docs/REVIEW.md)
When any English documentation source under
docs/src/**/*.mdis modified, regenerate the POT file.
docs/src/**/*.md: Format and lint Markdown documentation withrumdlviatreefmt; use code blocks with language tags, and preserve documentation Markdown from Prettier formatting.
Use the supported mdBook admonition syntax:[!NOTE],[!TIP],[!IMPORTANT],[!WARNING], and[!CAUTION].
When linking to Cargo-generated API pages, use absolute HTML links such as/api/cadmus_core/...; do not use relative Markdown links.
Do not embed locale prefixes such asen/in API Markdown links; use unprefixed/api/...site routes.
Use conversational, friendly, active-voice language and avoid jargon in user-facing documentation.
Files:
docs/src/contributing/devenv-setup.md
docs/**/*.md
📄 CodeRabbit inference engine (docs/REVIEW.md)
docs/**/*.md: Format Markdown files with Prettier.
Ensure Markdown files pass rumdl according to.rumdl.toml.
Files:
docs/src/contributing/devenv-setup.md
docs/src/contributing/**/*.md
📄 CodeRabbit inference engine (docs/AGENTS.md)
Contributor documentation may use technical terminology, should be clear and direct, should include code examples where helpful, and must document setup steps precisely.
Files:
docs/src/contributing/devenv-setup.md
crates/core/**/*.rs
📄 CodeRabbit inference engine (crates/core/REVIEW.md)
crates/core/**/*.rs: Do not use"string literal".to_string()orformat!("literal")for user-visible text.
Thefl!macro must be used at every call site for user-visible text.
crates/core/**/*.rs: Allhandle_eventandrendermethods in view components must use the specified OpenTelemetry#[cfg_attr(feature = "tracing", tracing::instrument(...))]instrumentation.
Instrumentationskip()names must exactly match the method parameter names, including underscore prefixes.
Verify tracing instrumentation withcargo check --features tracing.
A view'srender()is called only when it has no children or is a background view; container views with children are not rendered directly.
For container decoration, use a background view for content rendered before children, or a dedicated child view for overlays rendered in child order.
Rustdoc examples should prefer fully compilable examples, thenno_run, and useignoreonly for private orpub(crate)items unreachable from the test harness, with an explanatory comment.
Use#to hide Rustdoc example boilerplate and verify examples withcargo test --doc.
Use typed SQLx macros:sqlx::query!,sqlx::query_as!, andsqlx::query_scalar!; do not use untyped query functions.
Use.flatten()onquery_scalar!results for nullable columns producingOption<Option<T>>.
Untyped SQLx queries are permitted for dynamic SQL only when unit tests cover every dynamic path and a comment explains why a typed macro cannot be used.
All user-visible strings must usefl!withuse crate::fl;; do not hardcode labels, buttons, placeholders, notifications, or other user-facing text.
Pass Fluent variable values at call sites usingfl!("id", var = value).
Apply localization toSettingKindlabels,Event::OpenNamedInputlabels, menu entry text, button labels, notification text, and all other user-visible strings.
Files:
crates/core/src/ota/cleanup.rs
.agents/skills/**
📄 CodeRabbit inference engine (AGENTS.md)
For workflows, load the matching skill from
.agents/skills/before performing native builds, Kobo builds, formatting, linting, sqlx regeneration, documentation, translation synchronization, or log lookup.
Files:
.agents/skills/build-cadmus-native/SKILL.md
🧠 Learnings (2)
📚 Learning: 2026-05-31T07:53:12.579Z
Learnt from: OGKevin
Repo: OGKevin/cadmus PR: 553
File: docs/src/installation/migration.md:87-88
Timestamp: 2026-05-31T07:53:12.579Z
Learning: For markdown files under docs/src/ in the cadmus (OGKevin/cadmus) repo, validate mdBook admonition syntax using the allowed types: NOTE, TIP, WARNING, IMPORTANT, and CAUTION. The correct format is a blockquote prefix like `> [!NOTE]`, `> [!TIP]`, `> [!WARNING]`, `> [!IMPORTANT]`, or `> [!CAUTION]`. Do not flag `[!CAUTION]` or `[!IMPORTANT]` as non-standard in this repo.
Applied to files:
docs/src/contributing/devenv-setup.md
📚 Learning: 2026-05-23T14:57:43.820Z
Learnt from: OGKevin
Repo: OGKevin/cadmus PR: 478
File: crates/core/src/view/settings_editor/refresh_rate_by_kind_editor.rs:91-91
Timestamp: 2026-05-23T14:57:43.820Z
Learning: When reviewing Rust code that calls `ToggleableKeyboard::new(parent_rect: Rectangle, number_mode: bool)` (from `crates/core/src/view/toggleable_keyboard.rs`), treat the second argument as `number_mode` (numeric/number-layout mode), not as an initial visibility flag. In the constructor implementation, `visible` is initialized to `false` and the keyboard starts hidden; only the numeric layout changes based on `number_mode` (e.g., for numeric inputs like `refresh rate u8`). Therefore, do not flag `ToggleableKeyboard::new(rect, true)` as “making the keyboard start visible.”
Applied to files:
crates/core/src/ota/cleanup.rs
🪛 SkillSpector (2.3.11)
.agents/skills/build-cadmus-native/SKILL.md
[warning] 50: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 52: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 53: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 61: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 113: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 113: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 113: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
🔇 Additional comments (4)
docs/src/contributing/devenv-setup.md (1)
27-34: LGTM!Also applies to: 53-53, 100-100
xtask/src/tasks/dist.rs (1)
129-136: LGTM!crates/core/src/ota/cleanup.rs (1)
86-94: LGTM!renovate.json (1)
68-80: LGTM!Also applies to: 202-237
d491cdb to
489de4b
Compare
Change-Id: 72817cc55199780786f40e90f6e6cfc5 Change-Id-Short: sxrysnnuuyqq
489de4b to
a796628
Compare
This commit adds Core fonts from https://github.com/nicoverbruggen/ebook-fonts and makes it the default font.
It also removes the fonts from git and adds a new xtask command to fetch from from source.
Change-Id: 0dcf4dea1fd43e8544047d0afe59fe22
Change-Id-Short: zmnkvmlpykmv
Closes: #374
Closes: #505