Skip to content

chore(pm): cache projects_v2_node_id to skip per-create gh project view read#424

Merged
aleskalfas merged 2 commits into
mainfrom
chore/310-cache-projects-v2-node-id
Jul 1, 2026
Merged

chore(pm): cache projects_v2_node_id to skip per-create gh project view read#424
aleskalfas merged 2 commits into
mainfrom
chore/310-cache-projects-v2-node-id

Conversation

@aleskalfas

Copy link
Copy Markdown
Owner

What

Cache the Projects-v2 project node id in adopter config so create-issue's board path skips a per-create gh project view round-trip.

  • create-issue_resolve_project_node_id reads config["projects_v2_node_id"] first; live-resolves via gh project view only on a miss (same id, cached). No output/behaviour change.
  • bootstrap (greenfield) — populates the field into project/config.yaml at adoption when a board is configured (round-trip write preserves comments; idempotent); no-op in label-fallback mode.
  • adopt-existing (brownfield) — resolves the id and surfaces it as a recommendation in the audit report + --json inventory. It does NOT write config, preserving the DEC-037 mutate-nothing invariant (draft-not-apply). The read-side slot in _lib/hooks.py already existed; this populates it.

Design note

adopt-existing recommends rather than writes (DEC-037 §1 forbids brownfield config mutation, enforced by tests); bootstrap does the write. A faithful reading of "populated at adoption" that respects the stronger invariant.

Doc impact

New optional projects_v2_node_id config field documented in the capability README config example (there is no JSON schema for config.yaml).

Surface / version

Capability-internal surface change: project-management component.version 0.44.0 -> 0.45.0 (minor). Backbone .pkit/VERSION unchanged (no dispatcher/COR/manifest change). Additive optional field -> no migration.

Verification

  • targeted tests (create-issue/bootstrap/adopt-existing) -> 113 passed; full pm suite -> 1823 passed.
  • cache-hit asserts zero gh project view calls; cache-miss falls back to live; bootstrap populates when board+uncached, skips otherwise.
  • pkit schemas validate pass; pkit migrations check-diff -> no triggers; exec bits 100755 preserved.

Closes #310.

aleskalfas and others added 2 commits July 1, 2026 17:01
…ew read

create-issue's board path now reads the project node id from config
(projects_v2_node_id) first, live-resolving via gh project view only on a miss.
bootstrap populates the field at adoption; adopt-existing resolves + recommends
it (it cannot write config per DEC-037 mutate-nothing). Additive optional field,
no output change, no migration. Closes #310.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…0 for node-id cache

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@aleskalfas

Copy link
Copy Markdown
Owner Author

Reviewer agent (local, reviewer): APPROVED

  • Branch shapechore/310-cache-projects-v2-node-id matches the <conv-type>/<issue-number>-<slug> pattern in git-conventions.yaml (branch-name). Pass.
  • Branch-type / issue-type alignment — closing issue [Task] Cache projects_v2_node_id in config to avoid per-create gh project view read #310 carries type:maintenance, which maps to conv-type chore per classification.yaml pr_type_mapping; branch prefix is chore. Pass ([project-management:DEC-013-branch-and-pr-conventions]).
  • PR title Conventional Commitschore(pm): cache projects_v2_node_id to skip per-create gh project view read parses as <type>(<scope>): <desc> with chore in the accepted PR-title set. Pass (COR-008).
  • PR title type ↔ issue typechore is the mapped type for type:maintenance. Pass.
  • Issue classification complete[Task] Cache projects_v2_node_id in config to avoid per-create gh project view read #310 carries type:maintenance, priority:Low, workstream:decisions (plus state:in-progress); all three axes present. Pass ([project-management:DEC-012-classification-axes]).
  • PR body links closing issueCloses #310. present and closingIssuesReferences populated. Pass.
  • Surface-change discipline — diff is an additive optional config field (projects_v2_node_id) with new resolver/persist helpers; no renames/removals in kit-owned trees, no schema_version bump (stays 2), no subtree restructure. The bump is component.version 0.44.0→0.45.0, not a schema bump. PR reports pkit migrations check-diff → no triggers; no migration required. Pass (COR-010).
  • No-shared-files invariant — all edits are under the project-management capability tree (its own scripts, README, package.yaml) and tests/; no */core/-owned files touched. bootstrap's write targets the adopter-owned project/config.yaml, not a core-owned file. Pass (COR-001).

Note (informational, not gating): adopt-existing recommends rather than writes config, preserving the DEC-037 mutate-nothing posture — consistent with the review scope's expectation and out of scope for a correctness verdict. Every criterion resolves to pass; verdict follows mechanically.

@aleskalfas aleskalfas merged commit 85f2477 into main Jul 1, 2026
1 check passed
@aleskalfas aleskalfas deleted the chore/310-cache-projects-v2-node-id branch July 1, 2026 15:05
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.

[Task] Cache projects_v2_node_id in config to avoid per-create gh project view read

1 participant