Skip to content

Retire superseded Apps entry points and verify the installed layout - #666

Merged
zengchuang-hw merged 3 commits into
mainfrom
codex/635-retirement-candidate
Nov 25, 2026
Merged

zengchuang-hw merged 3 commits into
mainfrom
codex/635-retirement-candidate

Conversation

@zengchuang-hw

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

Copy link
Copy Markdown
Contributor

Refs #635

Scope and dependency

This is the final Apps layout slice accepted in the governing task. It includes main@ae6c218a, which contains the squash of #648 and the repository test directory changes. The retirement retains the later Qwen protocol identity regression from main. Two Qwen Turbo examples also moved to the canonical artifact helper after Ready CI exposed their old imports. #645 and #646 have merged. Relevant architecture anchors are A1 (module ownership), A3 (retired paths), and A7 (frozen records).

What to review

  • The Apps root contains __init__.py, api.py and nine owning packages. The 25 forwarding paths are deleted. Migration inventory lists replacements, public exports, registered consumers and the first removal version. The latest published patch tag at reconciliation was v0.3.3, which still carries the old paths.
  • The current Apps overview moves to docs/guides/apps.md, including its search workflows and current test locations. Root file checks and the repository import gate now require the actual owners.
  • apps.legacy.records.load_record reads trusted local historical RunOutput and DeliveredContextDraft records on their original platform. It preserves original bytes and returns the canonical classes. Frozen workers and sessions retain their original runtime for replay. Review this reader, the inventory and the installed-wheel checks separately from the mechanical deletions.

Verification

Check Result
Windows checkout Repository Ruff and whitespace checks passed. Focused regressions recorded 178 passed, 4 skipped, 2 deselected and 11 passing subtests. Two symlink tests require a privilege unavailable on this host. After updating the final inventory assertions, the repository import gate passed all 74 tests and 43 subtests.
Installed wheel outside the checkout 771 resources checked, both CLI launchers and a cold package knowledge read passed. All 17 production CLI cases passed, including CPU prepare/execute/assess, publication and original-attempt replay.
Historical records and sessions Both legacy types across protocols 0–5 (12 files) matched original hashes and fields. The two-wheel interrupted-session recovery case passed. Both canonical engineering verifier invocations returned the expected result bytes, with the historical worker digest preserved.
Plugins and links 75 Codex, WorkSwarm and DSH tests passed. All 210 local Markdown link targets checked in changed documents exist.

Issue verification record · Candidate Draft CI. Follow-up commit ec4a6464 migrates the imports in both Qwen examples, registers both direct consumers, and extends the retired-import and consumer-registration checks to Python examples. With a normalized Windows temp path, both campaign test modules and the Apps migration module completed with 66 passed, 1 skipped and 8 passing subtests. ruff check src tests tools and git diff --check passed. At 03a762e3 the renamed installed-wheel checker and test helper imports are reconciled. All registered consumer files exist. Local Linux Ruff and the migration, Qwen Turbo campaign, Qwen validation, package inventory and import gate test modules passed (three skips). GitHub Ready CI and merged-main acceptance are tracked on the current revision.

Verification of the reconciled test layout

The Windows checkout used the same Git tree as 03a762e3 (57617f58). The Apps migration, Qwen campaign, validation, root inventory, artifact helper and import gate suites completed with 206 passed, 1 skipped and 51 passing subtests. Host inspection and knowledge API tests added 21 passes and 11 passing subtests. The four Codex, DSH and WorkSwarm suites completed with 91 passed and 2 skipped.

The externally installed wheel verified 771 packaged resources, both CLI entry points and all 17 production CLI tests. It read both historical record types across protocols 0–5 with their original hashes. Paired-wheel interrupted-session recovery and both canonical engineering verifier launch modes passed with the original worker hash intact.

Knowledge authorship declaration

{
  "schema_version": 1,
  "head_sha": "03a762e33fd2efe5618674c2e2fd1a6ab1621420",
  "human_only": false,
  "material_ai_authors": [
    {
      "tool": "Codex",
      "model_id": "GPT-6",
      "effort": "unknown",
      "role": "author"
    }
  ]
}

@Dong1017 Dong1017 added kind:task Bounded delivery task with a delegated slice area:apps Apps line: CLI, Python entrypoints, host inspection, workflows, views, and adapters labels Nov 25, 2026
Record the 25 module migrations for 0.3.4. Keep historical records readable, move the Apps guide, and verify the installed wheel and repository layout. Preserve the protocol identity regression from main.

Agent-assisted-by: Codex / GPT-6 [effort=unknown] (author)
Agent-assisted-by: Codex (implementation and verification)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
@zengchuang-hw
zengchuang-hw force-pushed the codex/635-retirement-candidate branch from 57d3fac to afb7fd9 Compare November 25, 2026 05:13
@zengchuang-hw
zengchuang-hw changed the base branch from codex/635-host-storage to main November 25, 2026 05:13
@zengchuang-hw
zengchuang-hw marked this pull request as ready for review November 25, 2026 05:13

@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.

Comment thread src/inferrsi/apps/artifacts.py Resolved

@Bounty-hunter Bounty-hunter 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.

deepseek-v4.1-flash (agent), acting for @Bounty-hunter.

PR review verdict — DO NOT PASS
Reviewed base 62949701cb03d7ade1c9d6fe71fb7923191cb627 and head afb7fd9530a6decbaedfdbf468f6b8b516f6d6b4 for #635. The change cannot merge as it stands: a deleted compatibility module still has live importers, and exact-head CI is red on both Python versions.

Blocker — accepted step 4 requires in-repo active use to be switched before the old entries are deleted, and acceptance item 2 requires the affected imports to be regressed. src/inferrsi/apps/artifacts.py is deleted in this PR, but examples/qwen21_turbo_b300.py:25 still has from inferrsi.apps import artifacts, and examples/qwen21_turbo_quality.py:9 still has from inferrsi.apps import artifacts as lifecycle. The first file is imported at tests/campaigns/test_qwen21_turbo_campaign.py:15, the second at line 16; tests/campaigns/test_qwen21_validation.py:15 imports that module. Exact-head CI run 45552102809 therefore fails collection in both full-check (3.10) and full-check (3.11) with ImportError: cannot import name 'artifacts' from 'inferrsi.apps' at examples/qwen21_turbo_b300.py:25, and the validation module fails through the same chain. The inferrsi.apps.artifacts entry in docs/apps-module-migrations.json also omits both examples and these two campaign tests from consumers, so the inventory cannot catch this gap.

Required correction: migrate both importers to inferrsi.apps.storage.artifacts, add both files (and the campaign tests that reach them, if the inventory is meant to record transitive consumers) to the inferrsi.apps.artifacts consumer list, and re-run exact-head full-check on Python 3.10 and 3.11.

What I checked, and what I did not

Revision. PR open, non-draft, base 62949701 is current main; head afb7fd95 is current; 42 files, +300/−580, one commit. main still equals the base recorded in the body.

Retirement set. All 25 inventory entries carry status: retired and first_removal_version: 0.3.4 with a canonical target. The 26 deletions are the 25 shim modules plus the old Apps README; the root now contains only __init__.py, api.py and the nine owning packages (cli, delivery, handoff, host, integrations, legacy, storage, views, workflows). I confirmed every deleted module was a re-export shim, not unique code.

Consumer scan. I unpacked the head tarball (3,773 entries) and scanned every tracked .py, .md and .json for imports of the 25 retired names. The only live imports are the two examples above. Remaining mentions are intentional or historical: src/inferrsi/apps/legacy/records.py maps the two old record globals, apps/delivery/adapters.py:125 keeps the persisted "namespace": "inferrsi.apps.result" value, and docs/reviews/pr437-s01-reproduction/ is a pack pinned to archived SHAs. No dangling link to the deleted apps/README.md remains in changed docs.

Legacy reader. src/inferrsi/apps/legacy/records.py is a whitelist pickle.Unpickler: it accepts only RunOutput/DeliveredContextDraft (old or canonical globals), copy_reg/copyreg._reconstructor through a constructor check, object, _codecs.encode limited to latin1, and pathlib path classes; every other global raises UnpicklingError, and the result type is checked after load. This matches the documented "trusted local record on its original platform" scope.

Installed-layout check. tests/check_installed.py now asserts the exact installed apps root listing and the canonical verifier entry points, and drops the old shim round-trip. tests/repository/test_target_module_import_gate.py and tests/repository/test_package_root_inventory.py were updated to the canonical paths; I did not find an assertion weakened beyond the deletion.

Checks. All 11 other check runs on afb7fd95 are green, including the installed-package, lint, dashboard and host-compatibility jobs; only the two full-check jobs fail, at collection, before any campaign test executes. I did not run the full suite or a wheel install locally, did not verify the candidate CI claim for 57d3fac2, and did not verify the Windows runs or the "42-file diff reproduces f4f2c8b..57d3fac" claim. Merged-main acceptance is still pending per the PR body, as expected.

@Bounty-hunter Bounty-hunter 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.

deepseek-v4.1-flash (agent), acting for @Bounty-hunter.

PR review verdict — DO NOT PASS
Reviewed base 62949701cb03d7ade1c9d6fe71fb7923191cb627 and head afb7fd9530a6decbaedfdbf468f6b8b516f6d6b4. I read the full 42-file diff, the governing issue #635 and its thread, the migration inventory, the new apps/legacy/records.py reader, and the head CI logs.

Blocker: the retirement leaves two active repository examples importing a deleted path, and both required full-check jobs fail.

The diff deletes src/inferrsi/apps/artifacts.py, but these active consumers still use the retired module:

  • examples/qwen21_turbo_b300.py:25 — from inferrsi.apps import artifacts
  • examples/qwen21_turbo_quality.py:9 — from inferrsi.apps import artifacts as lifecycle

At this head, full-check (3.10) (job 138995425436) and full-check (3.11) (job 138995425222) complete as failure. Both stop during collection with:

tests/campaigns/test_qwen21_turbo_campaign.py:15: import qwen21_turbo_b300
examples/qwen21_turbo_b300.py:25: from inferrsi.apps import artifacts
ImportError: cannot import name 'artifacts' from 'inferrsi.apps'

This is the A3 retired-path boundary and #635 §5 step 4: delete the old entries only after active in-repo usage has switched. The new guard does not catch this class of miss: tests/apps/test_apps_module_migrations.py::test_active_consumers_use_canonical_paths_and_are_registered walks only the consumers registered in docs/apps-module-migrations.json, and neither example appears in the inferrsi.apps.artifacts consumer list. The 178 focused regressions and the repository import gate therefore passed while main would break at the first Qwen campaign collection.

Required correction:

  1. Switch both examples to from inferrsi.apps.storage import artifacts (keeping the lifecycle alias in the quality script).
  2. Add both files to the inferrsi.apps.artifacts consumers in docs/apps-module-migrations.json, so the registered-consumer check covers them.
  3. Re-run full-check (3.10) and full-check (3.11) and record the result.

What I checked and did not find blocking

  • The 25 inventory entries all declare status: retired and first_removal_version: 0.3.4; each canonical module exists and exposes the listed names.
  • The new legacy/records.py uses a strict find_class whitelist for the two record types, their canonical names, copy_reg/copyreg reconstruction, pathlib path classes and the Python 2 bytes bridge. RunOutput holds str, Path | None and a dict; DeliveredContextDraft holds bytes, strings, lists and dicts, all covered. The protocol 0–5 tests exercise the two historical record types.
  • The root inventory is now __init__.py, api.py and the nine owned packages; the installed-wheel check asserts the same set.
  • I did not run the Windows checkout, the installed wheel, the plugin suites or the historical double-wheel recovery; those remain author-reported and CI covers only the Linux checks above.

Optional follow-up (not a blocker)

  • Add a repository-wide scan that flags any Python file importing a retired Apps name, instead of relying only on the registered-consumer list. That would have caught these two examples before CI did.

Register both example consumers and scan the examples directory in the
Apps migration guard so retired package imports fail before use.

Agent-assisted-by: Codex / GPT-6 [effort=unknown] (author)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
Use the relocated test helpers and installed-wheel checker in the migration inventory. Preserve both Qwen example consumers and historical record coverage.

Agent-assisted-by: Codex / GPT-6 [effort=unknown] (conflict resolution and verification)
Signed-off-by: zengchuang <zengchuang3@huawei.com>

@Bounty-hunter Bounty-hunter 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.

deepseek-v4.1-flash (agent), acting for @Bounty-hunter.

PR review verdict — COMMENT (interim; binding Request changes from the afb7fd95 review still stands)

Reviewed delta ec4a6464c3a03a893923272b86d8a5e2e5d927b3...03a762e33fd2efe5618674c2e2fd1a6ab1621420 on PR #666.

The earlier blocker was the two active examples importing the deleted inferrsi.apps.artifacts. Both are fixed at this head:

  • examples/qwen21_turbo_b300.py:25 now reads from inferrsi.apps.storage import artifacts
  • examples/qwen21_turbo_quality.py:9 now reads from inferrsi.apps.storage import artifacts as lifecycle

The new head is a merge of main@ae6c218a (2,882-line delta) that mainly moves repository tests into tests/apps/ and tests/benchmark/ and updates docs/workflows; it also updates the migration inventory link in the PR body. I did not complete the re-review of the merged test tree or confirm exact-head full-check (3.10)/full-check (3.11) results in this pass, so I am not clearing the existing request-changes or issuing a formal verdict. A full re-review should follow on this head.

Copy link
Copy Markdown
Contributor Author

Codex, acting for @zengchuang-hw.

@Bounty-hunter @david6666666 the two previously failing full checks have finished on 03a762e33fd2efe5618674c2e2fd1a6ab1621420. Each reports 7,389 passed, 89 skipped, 1 deselected and 675 passing subtests. All Ready jobs passed, including the installed wheels and browser tests. Please complete the independent re-review on this commit. The earlier blocking review remains pending a new verdict. Python 3.10 · Python 3.11 · Complete Ready run.

@Bounty-hunter Bounty-hunter 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.

LGTM
deepseek-v4.1-flash (agent), acting for @Bounty-hunter.

PR review verdict — PASS
Reviewed base ae6c218a5692e7626e687865fae3cc486209a472 (merged into the head) and head 03a762e33fd2efe5618674c2e2fd1a6ab1621420 for #635. This re-review covers the delta from afb7fd95 and the main@ae6c218a merge resolution; the earlier full-diff review remains the basis for the unchanged files.

The previous blocker is resolved:

  • examples/qwen21_turbo_b300.py:25 and examples/qwen21_turbo_quality.py:9 now import inferrsi.apps.storage.artifacts; the quality script keeps its lifecycle alias.
  • Both examples are registered as consumers of inferrsi.apps.storage.artifacts in docs/apps-module-migrations.json.
  • tests/apps/test_apps_module_migrations.py::test_active_consumers_use_canonical_paths_and_are_registered now scans examples alongside src, tests, tools and plugins, so the class of miss that escaped the registered-consumer check is covered.

The merge with main@ae6c218a reconciles the repository test layout: the migration test imports tests.repository._gate_policy_support, and the inventory points at tests/repository/check_installed.py and tests/repository/_gate_policy_support.py. The diff against current main@443891ef is the intended 44 files: the 25 forwarding modules are removed, src/inferrsi/apps/legacy/records.py adds the whitelisted legacy reader, and docs, tests and examples follow.

Exact-head evidence on 03a762e3:

  • Ready CI run 45561127255: full-check (3.10) and full-check (3.11) both completed successfully; each log ends with 7389 passed, 89 skipped, 1 deselected, 1 warning, 675 subtests passed. installed-package 3.10/3.11, dashboard-browser, lint-and-smoke, pr-references and declarations also passed.
  • Advisory host-compatibility jobs passed on Windows and macOS.

What I did not verify: I read the exact-head check-run conclusions and the two full-check log tails, not every line of both 7,389-test logs. The current main tip has one later commit (443891ef) that is not in this head; I checked its new campaign test and evidence tooling for retired Apps imports and found none, but the combined post-merge result has not run in CI. No GPU, remote-host or production install acceptance was exercised.

@Dong1017 Dong1017 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.

LGTM

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

PR review verdict — PASS
Reviewed base ae6c218a5692e7626e687865fae3cc486209a472 and head 03a762e33fd2efe5618674c2e2fd1a6ab1621420 (full diff, diffComplete: true). This is Dong-bot (authorized delegate) acting for Dong1017.

Earlier blockers are resolved.

  • The afb7fd95 CHANGES_REQUESTED findings came from examples/qwen21_turbo_b300.py and examples/qwen21_turbo_quality.py. Both still imported the deleted inferrsi.apps.artifacts.
  • Both now import inferrsi.apps.storage.artifacts. The quality script keeps its lifecycle alias.
  • Both examples are listed as consumers in docs/apps-module-migrations.json.
  • test_active_consumers_use_canonical_paths_and_are_registered now scans examples/ as well as src, tests, tools and plugins. It also resolves the retired names that no longer exist as files. The same class of miss would now fail that test.

Other checks on the diff.

  • All 25 forwarding modules are removed. Every inventory entry now carries status: retired and first_removal_version: 0.3.4. The matching src/... shim paths are dropped from the consumer lists.
  • tests/apps/test_apps_module_migrations.py now asserts that each retired path raises ModuleNotFoundError and that its canonical module still exports the listed names. A test also pins the apps/ root to __init__.py, api.py and the nine owned packages. check_installed.py checks the same layout on the installed wheel.
  • src/inferrsi/apps/legacy/records.py is a whitelist-only unpickler.
    • It allows only RunOutput, DeliveredContextDraft, the Python 2 protocol 0/1 reconstruction and bytes helpers, and pathlib paths.
    • _new_record and _legacy_bytes check their arguments, and load_record checks the result type.
    • Tests cover pickle protocols 0 through the highest one, a retained legacy-name pickle for each of the two record types, and rejection of an unrelated pickled object.
    • legacy/ already has an __init__.py.
    • The docstring and docs/module-layout.md limit it to trusted local files on the original platform, which is the right scope.
  • The src/inferrsi/apps/README.md move to docs/guides/apps.md updates the links in docs/architecture.md, docs/module-layout.md, docs/benchmarks/engineering-benchmarks.md, docs/README.md and src/inferrsi/benchmark/README.md.
  • CHANGELOG.md and docs/guides/apps-output.md give the 0.3.4 migration path for script entries, pickles and frozen runs.

Independent evidence. @Bounty-hunter's formal APPROVED review on this exact head (pullrequestreview-6053201391) is seeded, and no CHANGES_REQUESTED is outstanding. It reports the full-check results on 03a762e3. I did not re-read the CI logs.

Not verified here. I did not run tests or CI, and I did not run the Windows pickle round-trips. I did not check main's newer files beyond the seeded diff. The merge resolution of main@ae6c218a rests on the diff and the independent Approve.

Non-blocking: the PR is a breaking removal and ships in 0.3.4. Release notes should repeat the CHANGELOG pointer so plugin authors see it.


@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.

LGTM
Dot, acting for @david6666666 (repository admin) under delegated independent InferRSI PR review and approval.

PASS — reviewed base ae6c218a5692e7626e687865fae3cc486209a472 and head 03a762e33fd2efe5618674c2e2fd1a6ab1621420 for #635. Both live Qwen Turbo examples now import inferrsi.apps.storage.artifacts, both consumers are registered, and the retired-import guard scans examples/. This resolves my collection blocker on the previous head.

Evidence and limits

I reviewed the 44-file retirement diff, the 25-path inventory and public API, installed module/file entry parity, the canonical module/test checks, and the separate trusted-local loader for the two specified retained record types. The breaking import-path removal is explicit in the migration guide; this is not a guarantee that arbitrary historical pickles load. Exact-head Ready run 45561127255 completed successfully for both Linux versions, both wheel checks, browser and the advisory hosts; knowledge-model-policy is green. I did not rerun the whole suite or exercise devices. This vote is not integration or final Issue acceptance.

@zengchuang-hw
zengchuang-hw merged commit 0ae7d0d into main Nov 25, 2026
13 checks passed

Copy link
Copy Markdown
Contributor Author

Codex, acting for @zengchuang-hw.

Squash-merged 03a762e3 into main as 0ae7d0d5 after three independent approvals on that head from @Bounty-hunter, @Dong1017 and @david6666666. All Ready checks passed and the review thread was resolved. The merged Apps root contains the two public root files and nine owned packages. Final verification is tracked in #635. Merge commit · Ready checks.

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

Labels

area:apps Apps line: CLI, Python entrypoints, host inspection, workflows, views, and adapters kind:task Bounded delivery task with a delegated slice

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants