Skip to content

fix(offline): da and nl build scripts autoconfigure their own language - #176

Merged
JarbasAl merged 1 commit into
devfrom
fix/offline-lang-tags-da-nl
Sep 26, 2026
Merged

JarbasAl merged 1 commit into
devfrom
fix/offline-lang-tags-da-nl

Conversation

@openvoiceos-bot

Copy link
Copy Markdown
Contributor

🤖 This draft PR was authored by an AI agent (Claude Opus 5).

What changes

Two offline build scripts pass a language tag that does not match their file
name. build_raspOVOS_da.sh passes de-DE and build_raspOVOS_nl.sh passes
n-NL. Both now pass the tag the hybrid and lite scripts for the same language
already pass: da-DK and nl-NL.

The other 9 offline scripts agree with their file name, and all 11 hybrid and
all 11 lite scripts agree with theirs. These two lines are the only
disagreement in lang_builds.

Why it matters

n-NL is not a language code. The result depends on the version of
ovos-config the image installs, so the same line has two different faults.

With ovos-config 2.3.11a2, which is the floor in constraints-alpha.txt that
the build scripts read, the call exits 1 and writes no configuration:

$ ovos-config autoconfigure --lang n-NL --offline --male --platform rpi5
langcodes.tag_parser.LanguageTagError: Expected a language code, got 'n'
$ echo $?
1

build_raspOVOS_nl.sh sets set -e on line 6, so the Dutch offline build
stops at that line. No image is produced.

With ovos-config 2.1.1, the newest release under the testing-channel ceiling
<3.0.0, the same call exits 0 and writes lang as n:

$ ovos-config autoconfigure --lang n-NL --offline --male --platform rpi5
$ python -c "import json;print(json.load(open('mycroft.conf'))['lang'])"
n

So on the older release the Dutch offline image builds and runs configured for
a language that does not exist.

de-DE is a valid tag, so the Danish script has no error to show. It exits 0
and writes German:

$ ovos-config autoconfigure --lang de-DE --offline --male --platform rpi5
$ python -c "import json;print(json.load(open('mycroft.conf'))['lang'])"
de-DE

A user who flashes the Danish offline image gets a device that listens and
speaks German.

Evidence

Each call above ran in its own sandbox, with HOME, XDG_CONFIG_HOME,
XDG_STATE_HOME and XDG_CACHE_HOME redirected, in two real virtual
environments: ovos-config 2.3.11a2 and ovos-config 2.1.1. The arguments are
the ones the scripts write.

The new tags answer in both environments:

2.3.11a2  da-DK  rc=0  lang=da-DK      nl-NL  rc=0  lang=nl-NL
2.1.1     da-DK  rc=0  lang=da          nl-NL  rc=0  lang=nl

The two releases normalise the tag differently, which is not what this PR
changes.

What is not proven here

No image was built or booted. This PR reads the script and runs the command the
script runs. The build stop on n-NL is read from the exit code and set -e,
not from a failed workflow run. A build of the Danish and Dutch offline images
is the check that closes it, and the offline image workflow has no pull request
trigger, so it needs a dispatch.

🤖 Generated with Claude Code

build_raspOVOS_da.sh passed de-DE and build_raspOVOS_nl.sh passed n-NL.
Both now pass the tag their hybrid and lite siblings pass: da-DK and nl-NL.

n-NL is not a language code. With ovos-config 2.3.11a2, the floor in
constraints-alpha.txt, the call exits 1 and set -e stops the Dutch offline
build. With ovos-config 2.1.1 it exits 0 and writes lang as n. de-DE is
valid, so the Danish offline image was configured for German.

T-3951

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4d6c6848-d5d3-4442-af28-527306281e0d

📥 Commits

Reviewing files that changed from the base of the PR and between b3ff0f2 and 5930861.

📒 Files selected for processing (2)
  • lang_builds/offline/build_raspOVOS_da.sh
  • lang_builds/offline/build_raspOVOS_nl.sh
 _________________________________________________________________________
< Yo dawg, I heard you like code reviews, so I reviewed your code review. >
 -------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

The automated pipeline has reached its destination. 🏁

I've aggregated the results of the automated checks for this PR below.

🔍 Lint

Ensuring your contribution is moving forward. 🚀

✅ actionlint: 10 workflow file(s), no finding


Helping you build the future of voice, one check at a time. 🎙️

@JarbasAl
JarbasAl marked this pull request as ready for review September 26, 2026 13:21
@JarbasAl
JarbasAl merged commit 40f11e6 into dev Sep 26, 2026
4 checks passed
@JarbasAl
JarbasAl deleted the fix/offline-lang-tags-da-nl branch September 26, 2026 13:21
JarbasAl added a commit that referenced this pull request Sep 29, 2026
…push

The lang image builders create a public GitHub release with no draft field
and no condition, and they run on a push to dev as well as on
workflow_dispatch. So every green push to dev cut a public raspOVOS release
dated that day. #176 merged on 09-25 and did not publish only because all
eleven build jobs failed, which is luck and not a guard.

The first cut of this guard was `if: github.ref == 'refs/heads/dev'`. That is
TRUE on a push to dev, so it stopped a dispatch from a pull request branch and
left the merge-publishes-a-release path exactly as it was. Two answered
rulings disagreed on whether that path was wanted. Decision
raspovos-dev-push-publishes-release settled it on 2026-09-28: dispatch-only, a
release is cut by hand.

The guard now tests the event as well as the branch:

    if: github.ref == 'refs/heads/dev' && github.event_name == 'workflow_dispatch'

  push to dev             -> builds the images, publishes nothing
  dispatch on a PR branch -> builds the images, publishes nothing
  dispatch on dev         -> publishes, and only a person starts that

Both publishing jobs of both builders carry it: create-release, which makes
the release, and upload-images, which uploads the assets to it. Guarding only
the first would leave the second uploading into whatever release it resolved.

This covers two of the five builders that create a release. The other three,
build_lite_lang_images.yml, build_raspOVOS_full.yml and
build_raspOVOS_lite.yml, carry the same change on
ci/guard-release-on-dev-push, which follows this pull request.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
JarbasAl added a commit that referenced this pull request Nov 26, 2026
…push (#178)

The lang image builders create a public GitHub release with no draft field
and no condition, and they run on a push to dev as well as on
workflow_dispatch. So every green push to dev cut a public raspOVOS release
dated that day. #176 merged on 09-25 and did not publish only because all
eleven build jobs failed, which is luck and not a guard.

The first cut of this guard was `if: github.ref == 'refs/heads/dev'`. That is
TRUE on a push to dev, so it stopped a dispatch from a pull request branch and
left the merge-publishes-a-release path exactly as it was. Two answered
rulings disagreed on whether that path was wanted. Decision
raspovos-dev-push-publishes-release settled it on 2026-09-28: dispatch-only, a
release is cut by hand.

The guard now tests the event as well as the branch:

    if: github.ref == 'refs/heads/dev' && github.event_name == 'workflow_dispatch'

  push to dev             -> builds the images, publishes nothing
  dispatch on a PR branch -> builds the images, publishes nothing
  dispatch on dev         -> publishes, and only a person starts that

Both publishing jobs of both builders carry it: create-release, which makes
the release, and upload-images, which uploads the assets to it. Guarding only
the first would leave the second uploading into whatever release it resolved.

This covers two of the five builders that create a release. The other three,
build_lite_lang_images.yml, build_raspOVOS_full.yml and
build_raspOVOS_lite.yml, carry the same change on
ci/guard-release-on-dev-push, which follows this pull request.

Co-authored-by: JarbasAi <jarbasai@mailfence.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants