Skip to content

[feat] generation: add dependency impact and result reuse queries - #480

Open
Qing7364 wants to merge 10 commits into
ThinkFlowLab:mainfrom
Qing7364:codex/issue-355-dependency-impact
Open

Qing7364 wants to merge 10 commits into
ThinkFlowLab:mainfrom
Qing7364:codex/issue-355-dependency-impact

Conversation

@Qing7364

@Qing7364 Qing7364 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Changing a generation configuration needs an explanation of which adopted results are stale and which downstream configurations are waiting on upstream changes. Add the shared, read-only generation.impact query: for A → B → C with independent D, editing B reports B as stale, C as pending upstream, and D as reusable.

  • Compare effective inputs with immutable adopted Job snapshots through existing input resolution, capability observations and controlled asset verification. Preserve pinned references, overrides, candidate/adoption boundaries, unresolved inputs, cycles and recoverable Job identities.
  • Expose the same bounded report through HTTP, Agent/CLI and the typed frontend client, with Chinese and English state/reason text. Retain material-node sourceItemId in timeline usage evidence without creating a generation dependency.
  • State the snapshot boundary explicitly: projectVersion / eventCursor cover the project snapshot; model rules and capability observations are independent reads, and the report does not reserve future inputs.
  • Include actual timeline use of historical results and unadopted candidates. association explains the link to a configuration, not adoption; reuse still compares the successful Job behind currentResultId.
  • Centralize impact error copy while preserving stable codes, HTTP statuses and shared translations for generic errors. Include a saved-project scenario, bilingual CLI guidance and request/response fixtures.

This delivers the dependency/reuse foundation of #355. Visible workbench integration awaits #212's public implementation/schema; the client helpers remain available for that integration. #342's public patch supplies storyboard audit/QC rather than this adopted-input comparison. The branch starts from upstream main 52102ed0 and integrates current main 63279266, including the earlier published node workflow in #479. The impact contract accepts its control reference role, covered by a regression that failed before the correction. No issue-87-only commits are included.

Linked issue

Refs #355

  • This references the broader issue without closing it.

Labels

Suggested labels: type:feat, area:agent, area:assets, area:timeline, area:docs.

  • Labels applied — external contributor has read access to the target repository.

Test plan

Local validation of the merged implementation, using Python 3.12.10 and Node 24.22.1:

  • Final tip 7b4eef0e integrates upstream main 63279266. Conflict resolution retains generation.impact, upstream job.status and Run layout error codes, then regenerates shared contracts. The pre-push rebase preserved the tested tree.
  • Final integration: 351 Python regressions passed across impact queries, contracts, localization, Agent gateway/metadata, CLI, HTTP creation, canvas/assets/history services and rule facts (39.09 seconds, one dependency deprecation warning).
  • Complete frontend suite at the final integration: 981 passed.
  • Generated contracts, all four import boundaries, i18n (3,377 keys, zero problems), type checking, production build and static checks over the complete PR diff passed. The build retains the existing large-chunk advisory.
  • Earlier complete CPU validation at 35e2fd9c, before the last upstream integration: 2,970 passed, 111 skipped with OPENDIRECTOR_REAL_CLI=1, 555.76 seconds. Its full inventory/execution audit had 3,081 collected, 152/152 required representatives passed, and 18 capabilities. This full-suite result is not attributed to the final merge; its focused Python checks are listed above.

The first full run had one setup error: the bundled OpenCode image-input test's worker received HTTP 503 before the model-input assertions (2,969 passed, 111 skipped). Its isolated repeat passed in 15.83 seconds. The successful full rerun and that initial failure are recorded in the validation document; runtime code, timeout limits and assertions were not changed to hide the observation.

Platform-specific CI/browser matrix coverage and #212 workbench interaction/language-switch acceptance remain separate scopes.

Evidence that it works

  • Validation evidence includes the saved-project scenario and captured request/response. Tests check HTTP/Agent/CLI equality, real files, adoption, pinning, reopening, candidate timeline usage and read-only behavior.
  • N/A for new screenshots: this adds query contracts, client support and display vocabulary without a rendered workbench flow.

Provider verification

  • No live GPU or commercial provider calls. Generation tests use a model double with real project commands/files; bundled OpenCode checks use the actual binary with a test model gateway. Creative quality, browser export and remote continuation caches remain separate acceptance scopes.

Bilingual UI

  • Matching zh-CN / en-US entries and bilingual CLI guidance are included. Frontend tests switch locales for all declared impact codes; HTTP tests verify localized error responses. No workbench browser language-switch acceptance is claimed.

## summary

Add bounded read-only impact contracts and derive dependency edges from
current follow bindings, including hidden and unresolved sources. Keep
pinned assets, retained subject slots and overrides distinct from live
generation dependencies.

## validation

94 Python tests passed; generated contracts and staged static checks pass.

Refs: ThinkFlowLab#355
## summary

Compare current inputs with the adopted successful job using the shared
snapshot constructor. Report current mismatches separately from pending
upstream changes, retain unresolved execution evidence and original job
identities, and identify retained timeline usages without mutation.

## validation

35 impact tests passed; 49 generation, recovery, H3, continuation and
version regressions passed. Static checks passed.

Refs: ThinkFlowLab#355
## summary

Serve generation.impact through the existing HTTP, Agent and CLI query
paths using one project snapshot and one local model catalog read. Add a
typed frontend read and bilingual state/reason text for workbench consumers.

## validation

69 Python query/API/Agent/CLI tests and 33 client tests passed. Contract,
import-layer, bilingual catalog, production build and static checks pass.

Refs: ThinkFlowLab#355
## summary

Exercise real project commands, files, candidate adoption, pinning and
reopening. Keep uncertainty ahead of pending propagation regardless of
reference order. Document the bilingual query workflow and provide
recorded request/response examples for workbench integration.

## validation

- Impact domain and query tests: 47 passed.
- Frontend suite: 961 passed.
- Static hooks, sample contracts and documentation links passed.
- Full CPU regression is still running; no live model calls were made.

Refs: ThinkFlowLab#355
## summary

- Reuse current capability observations and safe file verification caches
  across HTTP and Agent reads; retain typed query error codes.
- Include text overlays and recoverable original jobs in bounded evidence.
- Expose the supported node budget to the typed client, regenerate
  contracts and refresh bilingual integration examples.

## validation

- Focused impact, acceptance, gateway, timeline and asset suite: 215 pass.
- Final overlay and evidence-budget cases: 4 pass.
- Frontend suite: 962 pass; i18n: 3352 keys, no problems.
- Type checking, production build, contracts and import rules pass.

Refs: ThinkFlowLab#355
## summary

Record the tested source revision, complete local suite results,
environment skips, independent review fixes and reproducible commands.
Preserve the initial runtime-check failure and subsequent passing runs.

## validation

Documentation links and static hooks passed.

Refs: ThinkFlowLab#355
## summary

- Preserve the connected material node's sourceItemId in timeline
  consumers without adding a generation dependency or source association.
- Cover both source roles, retained B1 after B2 adoption, unconnected
  clips, dependency identities and project immutability in regression.
- Record the correction and distinguish its focused validation from the
  earlier complete-suite evidence.

## validation

- Impact, shared-query and creation-contract tests: 141 passed.
- Frontend impact and creation-client tests: 34 passed.
- Generated contracts, all four import boundaries and static hooks passed.
- i18n check: 3352 keys, 0 problems.

Refs ThinkFlowLab#355
@github-actions github-actions Bot added area:agent Agent runtime, assistant chat and tools area:docs Documentation / 文档 labels Nov 24, 2026
@github-actions
github-actions Bot requested review from FayeSpica and wuzhf9 November 24, 2026 01:18
## summary

- Document independent model reads and candidate timeline usage in the
  report contract and bilingual guide without changing wire structure.
- Centralize impact error copy while preserving existing error codes,
  generic translations and HTTP statuses; align the bilingual checklist.
- Cover candidate usage without adoption and missing-object responses
  in both languages, and record the validation scope.

## validation

- Impact, query, creation-contract and localization tests: 150 passed.
- Frontend impact/client tests: 34 passed.
- Contracts, import boundaries, i18n, build and static checks passed.

Refs ThinkFlowLab#355
## summary

- Integrate upstream lease recovery, node workflow and library selection.
- Accept structure-control references in impact reports and regenerate
  shared contracts, with a regression for an effective material input.
- Record complete validation and the initial OpenCode 503 observation.

## validation

- CPU suite: 2,970 passed, 111 skipped; 152 required cases passed.
- Frontend suite: 973 passed; contracts, import boundaries, i18n,
  type checking and production build passed.

Refs ThinkFlowLab#355
## summary

- Integrate current upstream main while retaining generation impact,
  job status and Run layout contracts and both documentation entries.
- Regenerate shared contracts and record the final integration checks.

## validation

- Affected Python regressions: 351 passed; frontend suite: 981 passed.
- Contracts, four import boundaries, i18n, type checking and build pass.
- The earlier complete CPU run belongs to 35e2fd9, as documented.

Refs ThinkFlowLab#355
@github-actions github-actions Bot added area:i18n Localisation and bilingual UI type:feat New capability or behaviour labels Nov 24, 2026
@Zhangbo-cn

Copy link
Copy Markdown
Contributor

PASS 7b4eef0 Refs #355

  • read-only is proven, not asserted: test_impact_query_is_read_only makes store.open, store.commit and CapabilityProbe.query raise, then checks that repeat queries are equal, snapshot.model_dump_json() and files_under(repository) are unchanged, and no provider call happens
  • the comparison genuinely reuses acceptance normalization: creation_generation.py now calls the new shared freeze_input_snapshot(), so the impact query cannot drift from the inputs an accepted job froze
  • _basis_complete() fails toward execution_basis_incomplete on unrecognized adapter fields or nested payloads instead of asserting a reuse it cannot prove — the right failure direction for this query
  • scope limits are enforced where the schema says: rootSpecIds 1–100 unique, maxNodes 1–10000 with no partial report on overflow, relation restricted to root/downstream/independent and not presented as an invalidation decision
  • contracts regenerate byte-identical and --check passes; the two fixtures validate as GenerationImpactReport (4 items / 2 dependencies / 2 timeline consumers) and carry no prompts, URLs or paths; the 26 display codes have zh-CN and en-US entries, and ContractError codes survive the agent gateway

Ran: Release checks green on 7b4eef0 (13/13); pytest tests/test_generation_impact.py tests/test_generation_impact_queries.py → 64 passed; pytest tests/test_localization.py tests/test_creation_contracts.py → 87 passed; node --test tests/generationImpact.test.ts → 3 pass; python3 scripts/generate_contracts.py --check → exit 0; check-i18n.mjs 0 problems, manifest 93 entries, locale 87 pages 0 problems
Not run: a real workbench flow — #212 is not landed, which the PR body states

Non-blocking: (a) MAX_IMPACT_EDGES = 20000 is a second constant for a limit GENERATION_IMPACT_EVIDENCE_LIMIT already expresses; say in the docs how the two relate or derive one from the other; (b) generationImpactText.ts and CreationClient.generationImpact() ship with no consumer until #212 — fine while the PR body keeps that boundary statement, so do not let it read as delivered UI; (c) maintainerCanModify=false, so any follow-up change has to come back through the author.

Coordinator: ping after this Reviewer PASS and green CI on this SHA. This skill does not merge.

This branch has not been deployed

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

Labels

area:agent Agent runtime, assistant chat and tools area:docs Documentation / 文档 area:i18n Localisation and bilingual UI type:feat New capability or behaviour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants