Repository navigation
Conversation
Every refusal and warning the gate prints now carries a stable machine code and a one-line fix, so a tool (an agent repairing its own bundle, a CI job) can act on a failure without parsing English: - Finding gains optional code and hint, serialized in --json when set; the text report adds a "fix [code]: …" line under each coded finding. The human messages are unchanged, and uncoded findings (notes for a reviewer, such as what a component reaches) print as before. - Codes cover the whole gate: structural admission, digest and signing, identity, contents, external references, secrets, storage, the listing, the agent and tools review, grants, history, the app's own functions, shared components and component releases. - Codes from the first printing keep their meaning; hub-host-undeclared is retired (HTTPS destinations are declarations, not refusals) and stays reserved. - docs/ERROR-CODES.md is the table, linked from PUBLISHING.md's gate rules, the READMEs and hub's usage. A code, once printed, never changes what it means; new codes may be added.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Every refusal and warning the admission gate prints now carries a stable machine code and a one-line fix, so a tool (an agent repairing its own bundle, a CI job) can act on a failure without parsing English.
Findinggains optionalcode/hint, serialized inhub check --jsononly when set (additive; existing JSON consumers are unaffected).fix [code]: …line under each coded finding. The human message line above it is byte-identical to today's; uncoded findings (reviewer notes such as what a component reaches) print exactly as before.docs/ERROR-CODES.mdis the table, linked from PUBLISHING.md's gate rules, both READMEs andhubusage. A printed code never changes meaning; new codes may be added.hub-host-undeclaredis listed as retired-and-reserved, since HTTPS destinations are now declarations rather than refusals.Example
Why
OctoBuddy runs coding agents that build OctoSense apps and loop on
hub checkuntil a bundle is admitted. With a code per finding, the agent gets an exact fix instead of guessing from the prose, and the same codes are usable from CI.Testing
cargo test -p octosense-app-contract -p octosense-app-policy -p octosense-app-hub --all-targets: 26 suites, 336 passed, 0 failed (new testa_refusal_names_its_code_and_one_line_fix)cargo test … --doc: passcargo clippy -p octosense-app-contract -p octosense-app-policy -p octosense-app-hub --all-targets --no-deps -- -D warnings: cleandocs/ERROR-CODES.md, and every active code in the table is used.Out of scope (present on
mainbefore this change):Cargo.lockis two lines behindCargo.toml, so--lockedrefuses; workspace-wide clippy reportstype_complexityincrates/app-hostand compile errors incrates/appstorefrom the sibling makepad checkout. This PR does not touch them.中文摘要:为准入检查(gate)报告里的每一条拒绝 / 警告加上稳定的错误码和一行修复建议。文本报告在原消息下新增一行
fix [code]: …,原有消息逐字不变;--json新增可选的code/hint字段。共 53 个错误码,覆盖当前 main 上的全部检查项(含 wasm 函数、共享组件和组件发布);docs/ERROR-CODES.md为码表,错误码一经发布含义不变。