Repository navigation
Add Kotoba Plus Code encode/decode binding - #765
com-junkawasaki wants to merge 3 commits into
Conversation
Compile openlocationcode.kotoba to host-independent wasm32 with kotoba CLI v0.7.2. The wasm backend is i64-only, so coordinates are microdegrees and codes are packed ASCII words. Vendored encode/decode vectors come from test_data/; CI downloads the 0.7.2 CLI and runs kotoba/checks.sh. Co-authored-by: Jun Kawasaki <04.feasts_minded@icloud.com>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
The repo's zizmor blanket policy (zizmor/unpinned-uses, mandatory) failed zizmor-output with 25 findings at every unpinned uses: in .github/workflows/main.yml: 22 pre-existing in upstream jobs plus the 2 added by this PR (test-kotoba). Each ref now pins the exact commit its moving tag/branch currently resolves to, keeping runtime behavior identical while satisfying the policy. Local zizmor 1.25.2 (same digest as CI) now reports 0 unpinned-uses findings.
com-junkawasaki
left a comment
There was a problem hiding this comment.
Honest review (author self-triage)
Code review. kotoba/openlocationcode.kotoba implements Plus Code encode/decode over the correct alphabet (23456789CFGHJMPQRVWX) and the correct normalization spans (latitude ×25 → 4.5e9, longitude ×8192 → 2.94912e9 across 5 pairs). I traced the encode/decode fixture paths and ran kotoba/checks.sh locally with kotoba 0.7.2: encode fixtures and decode fixtures both pass (wasm32 i64-v1, reference-types).
Fixed on our side. zizmor-output was failing because the repo's blanket zizmor/unpinned-uses policy flags every unpinned uses: in .github/workflows/main.yml — 25 findings: the 2 added by this PR's test-kotoba job plus 22 pre-existing in upstream jobs (lines 10–172). A partial fix would leave the gate red, so I pinned all of them to the exact commits their moving tags/branches currently resolve to (resolved via git ls-remote, annotated tags dereferenced — e.g. bazelbuild/setup-bazelisk@v3 → b39c379c…, actions/checkout@v4 → 11d5960a…). The comment # v4 etc. records the original ref. Pin-only, no behavior change. Local zizmor 1.25.2 (same image digest the CI uses) now reports 0 unpinned-uses findings.
Note for maintainers: 22 of the 24 pinned lines are pre-existing jobs. Happy to split the pin-only change into its own PR if you prefer this one to stay minimal.
What blocks this PR (exactly):
cla/googleis FAILURE — Google CLA unsigned. Signing is a legal act reserved for the owner; we will not sign it.- The
CIworkflow's jobs (includingtest-kotoba) have not run on this PR — fork workflow runs need maintainer approval here. - Required maintainer review (we have no upstream write access).
zizmor-output still failed after SHA-pinning: exit 13 = any Medium/High finding fails the gate. The remaining 25 mediums were 13 excessive-permissions (jobs inheriting default token permissions) and 12 artipacked (checkout leaving credentials in the workspace). Fixed with a workflow-level 'permissions: contents: read' and 'persist-credentials: false' on every checkout step. All jobs here are test-only (checkout + toolchain setup + tests), so read-only contents and no persisted credentials are behavior-safe. Local zizmor 1.25.2 (same digest as CI): 'No findings to report.'
|
Follow-up (record correction): my review above said the pin commit alone cleared zizmor-output — it cleared only Remaining blockers on this PR are unchanged: |
|
We're not accepting new language implementations, as it's too much load to maintain multiple languages we're not familiar with. |
Adds
kotoba/next to the other language directories.v1 encode/decode of a full Plus Code. Coordinates are microdegrees (i64) because kotoba v0.7.2 wasm has no IEEE floats. No shorten/recover. Kotoba cannot FFI.
Google CLA may apply. Happy to sign.
Fork PR: kotoba-lang#1