Repository navigation
Keep displayed issue fields out of Project field resolution - #2721
Conversation
codeforester
left a comment
There was a problem hiding this comment.
Review round 1 at 36f286f3
Verdict: Approved at 36f286f
Provenance: author Codex; reviewer Claude Code (Opus 5.5, claude-opus-5-5), in a session with no Codex context. Round 1 covers all five commits (24 files) against #2713's Expected behavior 1–7, Acceptance Criteria and acceptance-to-validation map, at the approved fingerprint b65f3144….
What's right
- One resolver (EB1, EB2).
resolve_project_fieldtries the standard name, then the Legacy name, and skips any field withis_issue_field.has_issue_field_clashlimits case C to the two roles.- Both transports set the marker: GraphQL from
isIssueField, REST fromissue_field_id. - The lookups share it:
find_schema_fieldandresolve_issue_field_updatesuse it, as doproject_field_nameandmake_copy_planin copy-fields, andselect_fields_by_name. - Every listed site is covered. I checked each one in the issue's site table against the diff.
- Both transports set the marker: GraphQL from
- Item values never come from an issue field (EB6).
- GraphQL:
find_project_item_state,fetch_project_issue_itemsandsingle_select_valuesdrop values whose field is an issue field. - REST:
_item_field_valuesdrops values withissue_field_idand keeps only the managed Project field IDs, which include both Legacy names. Update suppression and verification use the same filter. - Copy: the copy adapters key values by role, using the field the resolver picked, and
test_standard_empty_value_is_not_replaced_with_legacy_valuepins A2's order.
- GraphQL:
- Preflight (EB4). On the copy and
--replace-projectpaths,configureplans against the template's fields, which it reads from the same owner'sbase-project-templatethatcopy_template_projectcopies. Anerroraction returns before the dry-run branch and before any write. The test covers all three paths, each with and without--dry-run. - Readiness and Intake (EB5, EB7).
- Readiness: filters out
issue_field_idand applies cases A–D in unset mode too. It reads item values by field ID. - Intake's GraphQL path: replaces
gh project field-listwith a GraphQL query that readsisIssueField. It drops issue fields, uses a standard field before its Legacy one, fails closed when a role is missing, and reads and verifies item values by field ID. - Intake's REST path: handles unset mode like
project_fields. - Both workflow copies are identical.
- The tests cover the GraphQL cases. The Intake matrix seeds the issue field Priority with a value and asserts the selected Project field is still filled.
test_intake_issue_value_cannot_satisfy_legacy_readbackshows an issue-only match fails verification. Theissue_fieldsregression uses B1, which is #10's layout after Part B.
- Readiness: filters out
- Fixtures follow the map. A1–D2 and M, plus the synthetic A2 variant.
test_role_resolution_and_schema_clashpins each case's expected field IDs independently of the resolver, which the command matrix then reuses.
Live checks at this head (read-only)
- Acceptance criterion 2:
doctor --project base-project-template --owner basefoundryreports Priority as aconflictand Size asmissing, and exits 1. Main prints fourMISSING-OPTIONlines for P0–P3 instead. - Preflight against the real template: I ran
configure --project <unused title> --repo basefoundry/base --dry-runwith no config. It exits 1 with the Priority clash before any other step. With--config .github/base-project.ymlit previews normally and exits 0. - Map row 7 (Base unchanged): I compared this head with main for three commands: readiness on #2704, readiness on #2713, and a
set-fields --dry-runon #2711 with Base's config. The output was identical.
Local runs
pytest cli/python/base_github_projects/tests: 350 passed.pytest tests/test_project_intake_workflow.py tests/test_documentation_links.py: 146 passed.bats gh.bats inspection-json.bats: 98/98.git diff --check: clean.
Hosted checks are green.
Blocking
None.
Not blocking
-
The copy-path dry run gains two misleading lines. The copy path now prints the template plan's actions. Live, with Base's config, the preview for a new Project adds:
[DRY-RUN] Would Create GitHub Project., next toWould copy GitHub Project 'base-project-template' …;[DRY-RUN] Would Add missing options: Contract Hardening, Agentic Coding Platform., which repeats the "Would ensure Initiative option" lines.
Consider leaving out
create-projectwhen the run copies the template. Or say in the PR that the preview now includes the template plan. -
CONFLICTruns into the field name. The kind is exactly as wide asdoctor's 8-character kind column, so the output readsCONFLICTPriority. Main has the same flaw withMISSING-OPTION. A separating space in the formatter would fix both.
After merge
- Acceptance criterion 3 and map row 6: when Part B runs on #10, I'll run the reverse dry run. I'll also record whether GitHub returns issue-field values among item values. #7 has no items, so it can't show this.
- Map row 7: I'll repeat the readiness and
set-fields --dry-runcomparison on merged main. - Link keyword:
Part of #2713is right, because acceptance criterion 3 and map row 7 need evidence after merge.
Summary
Keep displayed organization issue fields out of Project-field resolution and item values. A genuine standard Priority/Size field wins before its Legacy field; issue-only name collisions fail closed. Configure checks existing/template fields before any copy, rename or other write. Readiness and both Intake copies use the same precedence, including unset mode, and Intake reads/verifies values using selected field IDs.
Issue
Part of #2713 — S1.
Approved contract: amendment review round 2, fingerprint
sha256:b65f3144440ecf7ee65e777ec4cb8518f280818b8931a0db73ea38813e75a889.Based on main
cb4fdc03, including #2716's schema resolver and #2718's by-ID item reads. The issue stays open for Ramesh's acceptance of the after-merge evidence.Validation
isIssueField/issue_field_id, with missing markers preserving existing behavior.Local results:
pytest cli/python/base_github_projects/tests: 350 passed.bats cli/bash/commands/basectl/tests/gh.bats: 87 passed; the matrix test contains 18 mode/fixture checks.pytest tests/test_project_intake_workflow.py: 145 passed.git ls-files -z '*.py' | xargs -0 pylint --rcfile=.pylintrc): passed.git diff --check: passed.basectl test baseitself stopped at the new worktree's local manifest-trust gate; its documented./bin/base-testPython phase and equivalent full BATS list were run directly without changing persistent trust settings.36f286f3f6289aff1c448774538bb2238d855fb9: 23 passed, including Tests and both provider suites, all four Python versions, all Pylint jobs, security, compatibility, integration, macOS and Windows. The conditional hosted release-train readback was skipped. The issue-branch-policy status also passes.All regression testing uses isolated recorded/synthetic responses. Live Project field mutations are limited to the authorized lifecycle Status transitions.
Impact and Evidence
docs/github-workflow.mdexplains source modes, Legacy fallback in unset mode and clash outcomes..ai-context/COMMANDS.mdupdated for implemented resolution; issue lifecycle follows DESIGN §§5.2/8.2.Risk, rollback and reviewer notes
Medium risk: field selection changes across Python, Bash and Intake. Start review with
project_field_resolution.py, configure preflight, and Intake's selected-ID read/verification. Revert this PR to restore command behavior; this PR performs no live schema/value migration.Not verified: GitHub's populated issue-value item response (Project #7 has no items); after-merge public doctor readback; acceptance criterion 3's post-Part-B reverse dry run; and map row 7's live comparisons. Ramesh accepts the after-merge evidence before closing the issue.
Docs Impact
Updated workflow guidance, CHANGELOG and tracked AI command context. The generated field-source default remains unchanged.
Demo Impact
No demo behavior change. Both copies of the downstream Intake workflow are covered by the same executable matrix.
Release note
Basectl no longer mistakes an organization issue field displayed in a Project for a Project field. Genuine standard fields take precedence over Legacy fields, including unset-source readiness and Intake; configure rejects unresolved clashes before writes.
Breaking / action required: no.
Assisted-by: Codex:GPT-6
Codex reports the GPT-6 model family; this session does not expose an exact runtime model ID.