Skip to content

feat(relations): derived rule-path edges and reconcile candidates (#1563) - #1636

Merged
SaulMoro merged 5 commits into
Tencent:mainfrom
Walternater:feat-1563-derived-relations
Nov 2, 2026
Merged

SaulMoro merged 5 commits into
Tencent:mainfrom
Walternater:feat-1563-derived-relations

Conversation

@Walternater

@Walternater Walternater commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Implements both parts of #1563: relations the team does not write by hand, each with an explicit basis.

Part 1 — rule paths: become MAPS_TO edges

Two fields already name the same files: a rule's paths: globs and a code page's source: frontmatter. When a glob matches a page's source, that is an edge, not a guess from names.

  • Computed when recall renders the pages it already loaded; the edges are never stored.
  • A glob that matches pages of exactly one visible codebase gives one MAPS_TO edge in each direction (the rule hit shows →, the page hit shows ←).
  • A glob matching pages in two codebases is ambiguous (globs are repository-relative) and gives no edge. A page of a withheld codebase never appears, so it never matches.
  • A declared relation to the same page wins over the derived one, the same precedence declared already holds over a link.
  • Glob matching is a small in-repo matcher (src/utils/glob.ts: ** crossing any depth, * within a segment, ?); no new dependency.
 [1/3] [rules] ledger-scoped [workspace]
 File: …/team-repo/rules/ledger-scoped.md
+Related: → MAPS_TO …/team-repo/teamwiki/evidence/code/pay/modules/ledger-receipts.md

 [3/3] [docs] ledger-receipts [workspace]
 File: …/team-repo/teamwiki/evidence/code/pay/modules/ledger-receipts.md
+Related: ← MAPS_TO …/team-repo/rules/ledger-scoped.md

Part 2 — proposed relations, accepted by PR

teamai codebase --reconcile --dry-run now also prints relation candidates: every rule and doc in the team clone becomes an input to the same term match the product pages already use (knowledge-reconciler), proposed always from a rule or doc, never from a teamwiki page, with the matched term and confidence. It writes nothing; a candidate shows in recall only after a person copies it into the asset's related: frontmatter, in an ordinary PR that review --branch checks. No new command or flag. A standalone --output tree holds no rules or docs and proposes nothing.

$ teamai codebase --reconcile --dry-run
Reconciliation complete: mappings=0, gaps=1, conflicts=0

Relation candidates (copy the ones you accept into the asset's related:)
  docs/payments-overview.md  MAPS_TO  teamwiki/evidence/code/pay/modules/ledger-receipts.md   term "LedgerReceipts", confidence 0.9

The candidates are also part of the --json result as relationCandidates; ReconcileResult gained that field.

Testing

  • npx tsc --noEmit, npm run lint, npm run build clean.
  • Unit: matchGlob semantics (segment wildcards, ** at any depth including zero, leading ./); derived-edge rules (one codebase both directions, two codebases none, no match none, declared wins); relationCandidates (doc and rule proposals, never from a teamwiki page, nothing for a standalone output tree). 46 tests in asset-relations + relation-candidates.
  • Existing reconcile suites (7 files, 441 tests) pass unchanged.
  • Real-CLI e2e (relations-e2e, 5 tests): derived edges render on both ends through teamai recall; --reconcile --dry-run prints the candidate above and git status in the clone is unchanged.

Notes

  • The glob read and the page source: read happen at recall time over files already on disk; nothing is cached across runs.

Refs #1563 (closes it once both parts land). #1552 keeps the umbrella.


Review rounds landed (Codex + SaulMoro): derived edges are judged per scope against the scope's own visible page pool (collectCodePages, enumerated from the wiki clone, withheld-aware) instead of the query's hits, so every query derives the same edges; braces in paths: expand exactly as the rule renderers expand them; the page pool is skipped when no rule in scope has paths:; knowledge-reconciler.ts keeps its original import and line shape; knowledge/sharing guides (+ zh) state that a Related: → MAPS_TO / ← MAPS_TO pair can also be derived, not only declared.

…ncent#1563)

Part 1 — a rule's paths: glob that matches the source: files of exactly
one visible codebase's page derives a MAPS_TO edge in each direction when
recall renders the pages it already loaded; the edges are never stored. A
glob matching pages in two codebases is ambiguous and gives no edge, a
withheld codebase's page never matches, and a declared relation to the
same page wins. Glob matching is a small in-repo matcher (**, *, ?).

Part 2 — teamai codebase --reconcile --dry-run also prints relation
candidates: every rule and doc in the team clone becomes an input to the
same term match as the product pages, proposed always from a rule or doc
(never from a teamwiki page) with the matched term and confidence. It
writes nothing; a candidate shows in recall only after a person copies it
into the asset's related: frontmatter, in a PR review --branch checks. A
standalone --output tree holds no rules or docs and proposes nothing.

Stacked on the Tencent#1552 first slice (Tencent#1629).
@Walternater
Walternater force-pushed the feat-1563-derived-relations branch from 3a25235 to 5a844df Compare November 1, 2026 04:41
@Walternater
Walternater marked this pull request as ready for review November 1, 2026 04:45
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
  • [P1 blocking] Derived edges cross scope boundaries — src/recall.ts:537: Every context matches against all result pages, and edges are keyed only by tree path. If user and workspace scopes both contain rules/payments.md, a matching user rule can cause the nonmatching workspace rule to display MAPS_TO to a workspace page. Compute and retrieve edges within the owning scope.

  • [P1 blocking] Ambiguity is checked across all globs instead of per glob — src/recall.ts:539: With paths: [src/pay/**, src/shop/**], where each pattern uniquely matches its respective codebase, the combined slug set has size two and both valid mappings disappear. Check each glob independently, then union its unambiguous edges.

  • [P2 non-blocking] The new user-facing behavior lacks documentation updates — src/codebase-cmd.ts:211: This PR adds reconciliation candidates and derived recall relations but changes no docs or skill-data. Update the affected bilingual guides and workflow references, as required by the repository’s behavior-change rules.

The testing description is sufficient: it records build/lint/type checks, targeted suites, and representative real-CLI verification covering both features and dry-run cleanliness. No additional provider × agent matrix is required. I did not run, build, or install anything from the PR.

… glob, document both (Tencent#1636 review)

- Derived edges are computed and kept per scope, so a user rule's paths
  glob can never mark a workspace rule or page: a relation stays inside
  its owner, the same fix Tencent#1629 made for declared relations.
- Ambiguity is judged per glob, not over a rule's whole glob list: two
  globs matching two different codebases are two certain edges, not one
  ambiguous pair that silences both.
- The bilingual knowledge guide documents the reconcile --dry-run
  candidates and the derived rule-path relations.
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
  • [P1 blocking] Page matching still crosses scope boundaries — src/recall.ts:549: Edge buckets are scope-specific, but every scope still matches against the same global pages list, which discards each result’s scope. If user and workspace clones contain teamwiki/evidence/code/pay/modules/ledger.md with different sources, a user page matching a workspace rule can produce a relation to the nonmatching workspace copy. Preserve page scope and filter matches to the owning context. The earlier scope-isolation finding remains partially unresolved.

Resolved earlier findings: ambiguity is now checked per glob, and both language versions of the knowledge guide document the new behavior.

The testing description is sufficient: it records targeted tests and representative real-CLI verification, including dry-run cleanliness. No additional provider × agent matrix is required. I did not run, build, or install anything from the PR.

Walternater pushed a commit to Walternater/teamai-cli that referenced this pull request Nov 1, 2026
…run record

Ports the Tencent#1636 review fix into the stats consumption path: edges from
computeDerivedRelations are per scope and per glob, so the run line's
related refs and the printed lines can no longer attach a user rule's
glob match to another scope's hit.
@Walternater

Copy link
Copy Markdown
Collaborator Author

Codex review addressed in bb1a77e9:

  • Derived edges cross scope boundaries — edges are now computed and kept per scope, and a hit renders only its own scope's bucket: a user rule's paths: glob can no longer mark a workspace rule or page (same owner-scope principle as feat(recall): declared asset relations on recall hits, checked by review --branch (#1552 first slice) #1629's review fix for declared relations). New unit test covers the cross-scope case.
  • Ambiguity per glob — each glob is judged independently: two globs matching two different codebases are two certain edges, not one ambiguous pair that silenced both. New unit test covers it.
  • Docs — the bilingual knowledge guide now documents the --reconcile --dry-run candidates and the derived rule-path relations.

Verification: tsc / lint / build clean; asset-relations relation-candidates (48 tests) and the real-CLI relations-e2e (5 tests) pass. The stacked #1637 rebased on top with the same semantics ported into its run-record path (44b1e981), full targeted suites green there too (315 + 5 tests).

Edge buckets were scope-local, but every scope still matched against the
combined page list: with the same teamwiki page path in the user and
workspace clones, a page of one scope could produce an edge to the other
scope's copy. Pages now keep their hit's scope, and a bucket matches only
its own pages (a page without a scope matches everywhere, for direct
callers).
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

No new findings in the specified diff.

Resolved earlier findings:

  • Derived edges and page matching now stay within the owning scope.
  • Ambiguity is checked independently for each glob.
  • Both language versions of the knowledge guide document the new behavior.

The PR description documents sufficient testing, including representative real-CLI verification of both features and dry-run cleanliness. No additional provider × agent matrix is required.

I only read the diff; I did not run, build, or install anything from the PR.

@Walternater

Copy link
Copy Markdown
Collaborator Author

Codex re-review addressed in 97af22ac: pages now keep their hit's scope, and each scope's bucket matches only its own pages — a user clone's page with the same teamwiki path can no longer produce an edge to the workspace copy. New unit test covers it; asset-relations (46) + relations-e2e (5) pass.

…ery hits

Review on Tencent#1636:
- computeDerivedRelations no longer takes the recall results. Each
  RelationContext now carries collectCodePages(teamwikiRoot, withheld):
  the source: files of every teamwiki/evidence/code/<slug>/ page in the
  scope's own wiki clone, filtered by the withheld list. A query that
  returns only one of two same-glob pages can no longer flip a certain
  edge into ambiguity, and a rule hit shows its -> MAPS_TO even when the
  page is not a hit. withheld === null (namespaces unreadable) hides
  every page, matching how declared teamwiki/ targets resolve.
- entryRuleGlobs expands braces with expandBraces, the same pass the
  rule renderers run, so paths: ["src/{pay,other}/**"] derives edges.
- knowledge.md/sharing.md (+ zh) mention that a Related: -> MAPS_TO pair
  can be derived, not only declared.

Verified: tsc, lint, build clean; asset-relations + recall-attribution +
lint-asset-graph + viz unit suites and the 5 real-CLI relations e2e pass.
@Walternater

Copy link
Copy Markdown
Collaborator Author

Both P1s fixed at b7fe124a, plus the docs P2.

[P1] Derived edges depend on query results. Rewritten. RelationContext now carries collectCodePages(teamwikiRoot, withheld) — the source: files of every teamwiki/evidence/code/<slug>/… page in the scope's own wiki clone, filtered by the withheld list (and empty when the namespace list can't be read, matching how declared teamwiki/… targets resolve). computeDerivedRelations no longer takes the recall results at all: each scope's source → codebase map is built once per recall from the pages that scope can see, so every query gets the same answer. A query returning only the pay page now derives no edge (the billing page is still in the pool), and a rule hit shows its → MAPS_TO whether or not the page is a hit. The key detail I hit while fixing it: pages never enter the scope search index — graph retrieval reads them from graph-index.json — so the pool is enumerated from the wiki clone on disk, which is also exactly what "the codebase pages the scope can see" means. New regression tests cover both the partial-hit scenario and the withholding rules.

[P1] Brace globs derive nothing. Fixed exactly as suggested: entryRuleGlobs now runs rulePaths(…).flatMap(expandBraces), the same pass the rule renderers run, with a test on paths: ["src/{pay,shop}/**"].

[P2] Docs. knowledge.md / sharing.md (+ zh) now state that a Related: → MAPS_TO / ← MAPS_TO pair can be derived from a rule's paths: glob, not only declared.

[P2] knowledge-reconciler.ts style. Both spots pre-date this change and aren't touched by it — leaving them alone to keep the diff surgical.

[P3] Reconcile candidates. Noted; the candidates mirror what the clone knows, so this is inherent to reading the delivered wiki. Happy to address separately if it ever misleads a member.

Verified: tsc / lint / build clean; asset-relations + recall-attribution + lint-asset-graph + viz suites and the 5 real-CLI relations-e2e tests pass at this head.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

No new findings in the specified diff.

Resolved earlier findings:

  • Derived edges and page matching stay within the owning scope.
  • Ambiguity is checked independently for each glob.
  • Both language versions of the knowledge and sharing guides document the new behavior.

The PR description documents sufficient testing, including representative real-CLI verification of both features and dry-run cleanliness. No additional provider × agent matrix is required.

I only read the diff; I did not run, build, or install anything from the PR.

@SaulMoro

SaulMoro commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Reviewed at 97af22ac against #1563, with the built CLI on an isolated home and a local team repo. codebase --reconcile --dry-run prints relation candidates with term and confidence and leaves the clone unchanged; the non-dry run writes only teamwiki/.indices/graph-index.json. When a rule and its page are both hits, recall shows the → MAPS_TO / ← MAPS_TO pair. CI is green at this head.

  • [P1 blocking] Derived edges depend on which pages the query returned. computeDerivedRelations (src/recall.ts:531) takes its pages from the recall results (:538, called from formatResults with the top hits), not from the codebase pages the scope can see. With one rule's paths: glob matching a source file of a pay page and of a billing page, a query that returns only the pay page prints ← MAPS_TO …/rules/<rule>.md on it, while a query that returns both pages prints none, so the two-codebase rule in [feat] Relations the team does not write by hand: rule paths and reconcile candidates #1563 holds only when both pages happen to be hits. In a one-codebase team, a rule hit shows no → MAPS_TO unless its page is also a hit. Building each scope's source → codebase map from its visible pages once per recall gives the same answer for every query.
  • [P1 blocking] Brace globs derive nothing. paths: ["src/{pay,other}/**"] never matches: entryRuleGlobs (src/recall.ts:362) passes globs through as written, while src/utils/glob.ts leaves braces to the caller and the rule renderers already run rulePaths(…).flatMap(expandBraces) (src/resources/team-rule.ts:128). Expanding them where the globs are read fixes it.
  • [P2 non-blocking] docs/guide/knowledge.md:87 still says → is "a relation the hit declares", and docs/guide/sharing.md:88 (and its Chinese page) says recall prints each declared relation; derived lines are new.
  • [P2 non-blocking] src/wiki-engine/knowledge-reconciler.ts:393 joins the Phase 3 for onto the endpoints line, and toPosix (:16) sits between two import blocks; neither is part of this change.
  • [P3 nit] Reconcile candidates read the clone, so a candidate can name a page of a codebase a member cannot see. Read from the code, not reproduced.

@jeff-r2026 Your call once the two blocking items are settled; #1637 builds on this one.

@SaulMoro

SaulMoro commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Re-checked at b7fe124a with the built CLI on last round's fixtures. Both blocking items are resolved:

  • With a rule's glob matching pages in two codebases, a query that returns only one of the pages now derives no edge.
  • In a one-codebase team, a rule hit shows → MAPS_TO whether or not the page is a hit.
  • paths: ["src/{a,b}/**"] now derives the edge.

collectCodePages builds each scope's map from its visible pages once per recall.

@jeff-r2026 Your call.

@Walternater Walternater changed the title feat(relations): derived rule-path edges and reconcile candidates (#1563, stacked on #1629) feat(relations): derived rule-path edges and reconcile candidates (#1563) Nov 1, 2026
- knowledge-reconciler.ts: toPosix sits below the import blocks again and
  the Phase 3 line is split — both spots came from this branch, not
  earlier (Tencent#1636 review).
- collectCodePages is skipped when no rule in scope has paths:, saving
  the ~65 ms walk for teams without scoped rules (Tencent#1636 review).
- knowledge.md (+ zh): the Related: line sentence says "a relation
  from the hit", covering derived MAPS_TO pairs too (Tencent#1636 review).

Verified: tsc, lint, build clean; asset-relations + recall-attribution
(218 tests) pass.
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

No new findings in the specified diff.

Resolved earlier findings:

  • Derived edges and page matching stay within the owning scope.
  • Ambiguity is checked independently for each glob.
  • Both language versions of the knowledge and sharing guides document the new behavior.

The PR description documents sufficient testing, including representative real-CLI verification of both features and dry-run cleanliness. No additional provider × agent matrix is required.

I only read the diff; I did not run, build, or install anything from the PR.

@SaulMoro

SaulMoro commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Read at 4c08fb46: the remaining points are addressed. In knowledge-reconciler.ts, toPosix now sits below the imports and the Phase 3 for is back on its own line. Both knowledge pages now define → as "a relation from the hit". The code-page walk is skipped when no rule in scope has paths:. Nothing open from our side.

@jeff-r2026 Your call; #1637 builds on this one and needs a rebase onto it.

Walternater pushed a commit to Walternater/teamai-cli that referenced this pull request Nov 1, 2026
…e onto Tencent#1636's page pool

Rebased onto Tencent#1636's collectCodePages pool; SaulMoro's re-check on Tencent#1637:
- codebase-wiki-lint prints the new not-checked line in English
  (AGENTS.md: no Chinese in CLI output).
- WikiLintReport documents that graphHealth can be null in every mode,
  standalone --output included: graph-index.json missing or corrupt means
  "not checked", never a measured 0%; scripts reading
  graphHealth.connectivity must handle null.
- formatResults delegates relation rendering to resultsRelations (which
  owns the derived-edge computation now); two leftovers from the rebase
  removed.

Verified: tsc, lint, build clean; lint-asset-graph + recall-attribution +
viz + asset-relations (270 tests) and the 5 real-CLI relations-e2e pass.
@Walternater

Copy link
Copy Markdown
Collaborator Author

Fixed at 4c08fb46 — and you're right, my earlier "pre-existing" claim was wrong: both knowledge-reconciler.ts spots came from this branch. Corrected:

  • [P2] toPosix sits below the import blocks again and the Phase 3 for is on its own line — the file reads as it did before this change.
  • [P3] collectCodePages is skipped entirely when no rule in scope has paths: (teams without scoped rules no longer pay the ~65 ms walk).
  • [P3] knowledge.md (+ zh) now says "a relation from the hit", covering derived pairs.
  • [P3] Title and description updated (feat(recall): declared asset relations on recall hits, checked by review --branch (#1552 first slice) #1629 has merged; review rounds summarized in the body).

Verified: tsc / lint / build clean; asset-relations + recall-attribution (218 tests) pass.

@Walternater

Copy link
Copy Markdown
Collaborator Author

Friendly nudge @jeff-r2026 — this one looks ready from our side:

  • Both of SaulMoro's blocking findings from the last re-check are resolved (derived edges now come from the scope's visible page pool, braces expand as the renderers expand them), and the remaining P2/P3s are fixed at 4c08fb46.
  • Codex's latest pass reported no new findings in the diff.
  • CI green, MERGEABLE against main.

This is the base of the stack: #1637 (#1562) rebases onto main once this squashes. Anything still holding it up?

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

This was generated by AI during triage.

Approving at 4c08fb4. Both parts of #1563 are met as the #1552 triage scopes them:

  • Rule paths: become derived MAPS_TO edges to the code pages whose source: they match, each with its basis. The edges are computed over the whole scope, not the hit list, and brace globs expand.
  • codebase --reconcile --dry-run proposes relation candidates, and they become relations only once a person accepts them in a PR.

Everything we raised earlier is resolved: derived edges from the hit list, brace expansion, and the reconciler cleanups. CI is green at this head. The CI review has nothing open.

#1637 builds on this one. Once this merges, please rebase it onto main.

@SaulMoro
SaulMoro merged commit 0af232c into Tencent:main Nov 2, 2026
18 checks passed
Walternater pushed a commit to Walternater/teamai-cli that referenced this pull request Nov 2, 2026
…e onto Tencent#1636's page pool

Rebased onto Tencent#1636's collectCodePages pool; SaulMoro's re-check on Tencent#1637:
- codebase-wiki-lint prints the new not-checked line in English
  (AGENTS.md: no Chinese in CLI output).
- WikiLintReport documents that graphHealth can be null in every mode,
  standalone --output included: graph-index.json missing or corrupt means
  "not checked", never a measured 0%; scripts reading
  graphHealth.connectivity must handle null.
- formatResults delegates relation rendering to resultsRelations (which
  owns the derived-edge computation now); two leftovers from the rebase
  removed.

Verified: tsc, lint, build clean; lint-asset-graph + recall-attribution +
viz + asset-relations (270 tests) and the 5 real-CLI relations-e2e pass.
Walternater pushed a commit to Walternater/teamai-cli that referenced this pull request Nov 2, 2026
… glob, document both (Tencent#1636 review)

- Derived edges are computed and kept per scope, so a user rule's paths
  glob can never mark a workspace rule or page: a relation stays inside
  its owner, the same fix Tencent#1629 made for declared relations.
- Ambiguity is judged per glob, not over a rule's whole glob list: two
  globs matching two different codebases are two certain edges, not one
  ambiguous pair that silences both.
- The bilingual knowledge guide documents the reconcile --dry-run
  candidates and the derived rule-path relations.
Walternater added a commit to Walternater/teamai-cli that referenced this pull request Nov 2, 2026
…ery hits

Review on Tencent#1636:
- computeDerivedRelations no longer takes the recall results. Each
  RelationContext now carries collectCodePages(teamwikiRoot, withheld):
  the source: files of every teamwiki/evidence/code/<slug>/ page in the
  scope's own wiki clone, filtered by the withheld list. A query that
  returns only one of two same-glob pages can no longer flip a certain
  edge into ambiguity, and a rule hit shows its -> MAPS_TO even when the
  page is not a hit. withheld === null (namespaces unreadable) hides
  every page, matching how declared teamwiki/ targets resolve.
- entryRuleGlobs expands braces with expandBraces, the same pass the
  rule renderers run, so paths: ["src/{pay,other}/**"] derives edges.
- knowledge.md/sharing.md (+ zh) mention that a Related: -> MAPS_TO pair
  can be derived, not only declared.

Verified: tsc, lint, build clean; asset-relations + recall-attribution +
lint-asset-graph + viz unit suites and the 5 real-CLI relations e2e pass.
Walternater added a commit to Walternater/teamai-cli that referenced this pull request Nov 2, 2026
- knowledge-reconciler.ts: toPosix sits below the import blocks again and
  the Phase 3 line is split — both spots came from this branch, not
  earlier (Tencent#1636 review).
- collectCodePages is skipped when no rule in scope has paths:, saving
  the ~65 ms walk for teams without scoped rules (Tencent#1636 review).
- knowledge.md (+ zh): the Related: line sentence says "a relation
  from the hit", covering derived MAPS_TO pairs too (Tencent#1636 review).

Verified: tsc, lint, build clean; asset-relations + recall-attribution
(218 tests) pass.
Walternater added a commit to Walternater/teamai-cli that referenced this pull request Nov 2, 2026
…ncent#1636)

Rule `paths:` globs that match a code page's `source:` become derived `MAPS_TO` edges, each with its basis. `codebase --reconcile --dry-run` proposes relation candidates, and a person accepts them in a pull request.

Closes Tencent#1563
Walternater added a commit to Walternater/teamai-cli that referenced this pull request Nov 2, 2026
…e onto Tencent#1636's page pool

Rebased onto Tencent#1636's collectCodePages pool; SaulMoro's re-check on Tencent#1637:
- codebase-wiki-lint prints the new not-checked line in English
  (AGENTS.md: no Chinese in CLI output).
- WikiLintReport documents that graphHealth can be null in every mode,
  standalone --output included: graph-index.json missing or corrupt means
  "not checked", never a measured 0%; scripts reading
  graphHealth.connectivity must handle null.
- formatResults delegates relation rendering to resultsRelations (which
  owns the derived-edge computation now); two leftovers from the rebase
  removed.

Verified: tsc, lint, build clean; lint-asset-graph + recall-attribution +
viz + asset-relations (270 tests) and the 5 real-CLI relations-e2e pass.
hz89Dev added a commit to hz89Dev/teamai-cli that referenced this pull request Nov 2, 2026
… for in the relations and read-gates code

`oxlint --fix` with only this rule on, over the files Tencent#1636, Tencent#1637 and
hz89Dev added a commit to hz89Dev/teamai-cli that referenced this pull request Nov 2, 2026
…unchecked casts

From Tencent#1636 and Tencent#1637:
- a code page's `source:` field is parsed with a schema (one path or a
  list, other entries name nothing) instead of typeof;
- readdirSync with an encoding returns string[], and Map iterators
  already type `.next().value`, so their casts go;
- the run line leaves `related` undefined, which the JSONL writer drops,
  instead of spreading an empty object;
- the health view's partial LocalConfig carries a SAFETY note naming the
  fields its readers use.

Proof: tsc and npm run lint pass; the recall, asset-relations and viz
tests pass.
hz89Dev added a commit to hz89Dev/teamai-cli that referenced this pull request Nov 2, 2026
… for in the relations and read-gates code

`oxlint --fix` with only this rule on, over the files Tencent#1636, Tencent#1637 and
hz89Dev added a commit to hz89Dev/teamai-cli that referenced this pull request Nov 2, 2026
…unchecked casts

From Tencent#1636 and Tencent#1637:
- a code page's `source:` field is parsed with a schema (one path or a
  list, other entries name nothing) instead of typeof;
- readdirSync with an encoding returns string[], and Map iterators
  already type `.next().value`, so their casts go;
- the run line leaves `related` undefined, which the JSONL writer drops,
  instead of spreading an empty object;
- the health view's partial LocalConfig carries a SAFETY note naming the
  fields its readers use.

Proof: tsc and npm run lint pass; the recall, asset-relations and viz
tests pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants