Skip to main content

LLM-first low-noise Build@1 guard for HarmonyOS and ArkTS repos.

Project description

hmos-precheck

Agent-first diff checks for HarmonyOS / ArkTS repositories.

Preflight

Install on Linux / macOS:

python3 -m pip install hmos-precheck
hmos-precheck --help

Install on Windows:

py -m pip install hmos-precheck
hmos-precheck --help

Verify and configure:

hmos-precheck doctor --project-root /path/to/repo
hmos-precheck init --scope user --commandline-tools /abs/path/to/command-line-tools

User config:

  • Linux: ~/.config/hmos-precheck/config.json
  • macOS: ~/Library/Application Support/hmos-precheck/config.json
  • Windows: %APPDATA%\hmos-precheck\config.json

Project config: <repo>/.hmos-precheck.json Resolution order: --commandline-tools -> project config -> user config -> HARMONYOS_COMMANDLINE_TOOLS -> auto-detect

Copy For Agents Use

Primary command:

Use `hmos-precheck run --project-root <repo> --output-dir <out>` as a gate.
Interpret stdout JSON only.
- `pass`: stop; do not read artifacts.
- `fail`: read `<out>/hmos-precheck-result.json` only; fix listed issues only; rerun once.
- `warn`: do not read artifacts unless the task explicitly requires debugging or environment repair.
Only `error` blocks. `warning` and `suggestion` stay in artifacts.
Treat `fail` as bounded repair: do not expand beyond the listed repair payload.
Do not read lint/detail artifacts on `pass`.
Do not share one `--output-dir` across parallel runs.
If rerun still returns `fail`, stop and surface the latest repair payload instead of looping.

Manual Use

hmos-precheck run --project-root /path/to/repo --output-dir /tmp/hmos-out
hmos-precheck run --project-root /path/to/repo --output-dir /tmp/hmos-out --base-ref origin/main --head-ref HEAD

Profiles: default and supported are arkts-diff, codelinter-diff. Checks: arkts-diff and codelinter-diff both run on changed .ets files only and keep changed-line diagnostics only.

Diff scope:

  • changed tracked .ets files
  • untracked .ets files not ignored by Git
  • ignored/generated files are skipped by Git ignore rules
  • sequential reruns are safe; parallel runs must not share --output-dir

Artifacts

Read policy: pass read nothing else; fail read hmos-precheck-result.json; warn read details only for explicit debugging.

Primary:

  • hmos-precheck-result.json

Debug only:

  • hmos-precheck-summary.md
  • hmos-precheck-debug.json with --debug-artifact
  • arkts-precheck-result.json, arkts-precheck-fix-summary.md
  • codelinter-report.json, codelinter-fix-summary.md
  • codelinter-stdout.txt, codelinter-stderr.txt

Release Check

python3 -m pylint src tests
python3 -m pytest -q
python3 -m build
python3 -m twine check dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hmos_precheck-0.1.1.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hmos_precheck-0.1.1-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file hmos_precheck-0.1.1.tar.gz.

File metadata

  • Download URL: hmos_precheck-0.1.1.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hmos_precheck-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d873720884d2470f0e811fabab46ad740cb3322cd77dada61edaa17b3bb84260
MD5 61de05c3d254decc267d8da294991089
BLAKE2b-256 3be4c8881140cac05661eefe782f66b6bd2e24c7b2744b8f3bcf15d4dd649efd

See more details on using hashes here.

File details

Details for the file hmos_precheck-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: hmos_precheck-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hmos_precheck-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 50dadee59d3e70efa27482b8a17888dcaddbcd34142407cae7c4b1bf41e15bd0
MD5 a915474e753c1b6ee9c71c8ad3682e9a
BLAKE2b-256 ebd8d9bf1680ff32c253e67d2ab521dffd512f77b94f502c54753d3c188f9d9c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page