Skip to content

Recognize catalog-backed infra context#144

Merged
saagpatel merged 1 commit into
mainfrom
codex/recognize-readme-context-standard
Jul 4, 2026
Merged

Recognize catalog-backed infra context#144
saagpatel merged 1 commit into
mainfrom
codex/recognize-readme-context-standard

Conversation

@saagpatel

Copy link
Copy Markdown
Owner

Summary

  • keep raw context quality classification conservative while exposing substantive README support as a reusable signal
  • promote only catalog-backed active high-criticality infrastructure from minimum-viable to standard when a separate substantive README supports complete AGENTS/CLAUDE context
  • document the scoped reconciliation rule and add regression coverage for both promotion and non-infra non-promotion

Verification

  • /opt/homebrew/bin/python3.13 -m py_compile src/portfolio_context_contract.py src/portfolio_truth_reconcile.py
  • /opt/homebrew/bin/pytest tests/test_portfolio_context_contract.py -q
  • /opt/homebrew/bin/pytest tests/test_portfolio_truth.py tests/test_portfolio_truth_sources.py tests/test_portfolio_context_triage.py -q
  • /opt/homebrew/bin/ruff check src/portfolio_context_contract.py src/portfolio_truth_reconcile.py tests/test_portfolio_context_contract.py tests/test_portfolio_truth.py
  • /opt/homebrew/bin/pytest tests/test_portfolio_context_contract.py tests/test_portfolio_truth.py tests/test_portfolio_truth_sources.py tests/test_portfolio_context_triage.py -q
  • /opt/homebrew/bin/python3.13 -m src.cli --portfolio-truth --portfolio-truth-include-security --portfolio-truth-allow-empty-notion saagpatel
  • /opt/homebrew/bin/pytest -q --ignore=tests/test_semantic_index.py --ignore=tests/test_per_section_draft_readmes.py

Notes

  • Full suite collection is blocked in this local Python env by missing optional dev dependencies: responses for tests/test_semantic_index.py and fastapi for tests/test_per_section_draft_readmes.py.
  • Live portfolio truth carried forward 135 Notion rows because live Notion context was unavailable.

@saagpatel saagpatel merged commit ad6050d into main Jul 4, 2026
4 checks passed
@saagpatel saagpatel deleted the codex/recognize-readme-context-standard branch July 4, 2026 08:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c6db57f21b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

def has_substantive_readme_support(
primary_context_file: str, context_files: list[str], readme_char_count: int
) -> bool:
context_file_names = {Path(item).name for item in context_files}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require top-level primary context support

When discovery returns nested context files, such as docs/AGENTS.md, this basename-only set treats it the same as a top-level AGENTS.md. A repo with that nested file plus a substantive top-level README but no top-level AGENTS.md/CLAUDE.md will satisfy this helper, so reconciliation can promote an otherwise README-only minimum-viable active infra repo to standard, overstating the primary context contract; compare the relative paths directly before enabling the promotion.

Useful? React with 👍 / 👎.

Comment on lines +187 to +188
if declared_values.get("category") != "infrastructure":
return raw_context_quality

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require catalog-backed infrastructure category

For repos whose catalog sets active/high/maintain but omits category, declared_values["category"] can still be infrastructure via the legacy registry fallback. In that scenario this new predicate promotes minimum-viable to standard and records workspace+catalog, even though the infrastructure evidence came from an old derived surface rather than the catalog-backed contract this rule is meant to require; check the category provenance or the repo/group catalog entries instead.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Post-merge Codex finding disposition: both portfolio context promotion findings were verified against current origin/main and are now tracked in #145.

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.

1 participant