Skip to content

Add pinned US equity research workflows - #1

Open
Pigbibi wants to merge 3 commits into
mainfrom
cursor/init-research-assistant-677a
Open

Pigbibi wants to merge 3 commits into
mainfrom
cursor/init-research-assistant-677a

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

AI assistance

Cursor Grok 4.7 cloud agent. The agent did not merge, did not apply owner-approved, and did not install anything into a Grok Bot.

What changed

Initial research configuration for this repository. It vendors six unmodified MIT skill files, adds thin adapters and one local X-topic skill, and checks a public research card in local tests.

Selected upstream files, pinned by full SHA:

  • yennanliu/InvestSkill 4d61af4ae5545a8fae8a78642c4f1a56ea3a20ec: fact-check, earnings-preview, catalyst-calendar, bear-case, etf-analysis.
  • jaredtrichard/grok-research d3d4b493d4d66cc08c31e13626ac3e750613c8b2: adversarial-review.

A follow-up commit tightens the card validator: non-string evidence_state returns errors, negated rumor wording stays allowed, and freshness is taken from each primary URL.

Governance workflows are copied from QuantStrategyLab/.github 1de428f00aeef77ba939edfd3420b202c7166953 and Pigbibi/PrGovernance 3d44e3d057681d5ae2730ad76af2f53b72d26767. No deployment, broker, account, or Bot routine is added.

How verified

Local command on dd2b6f60f3e40e4f677a42bc91832235c3c14a2a:

python3 -m unittest discover -s tests -v

Result: 36 tests, OK. No network and no private data. These tests do not show that a model follows the skills. GitHub Actions on this new head had not been observed when the description was updated.

The earlier Codex receipt names 4746bddc61e91d2ad15ba5e8741866508aafbb5f and recorded findings. It does not cover the current head.

Why

The repository needs a versioned, research-only way to check US equity and ETF candidates and emit an evidence card. Execution stays disallowed.

Risk

R2. The diff adds .github/workflows/, .github/governance/policy.json, schema/, and adapters/. A general request to continue or to allow an eventual merge is not approval of this head.

Current head: dd2b6f60f3e40e4f677a42bc91832235c3c14a2a. Base is main at 48eac4bf4aec78574937d4f5e06b7c885d9339d1.

Before merge, the same head still needs:

  • a current-head review receipt (ai-review-receipt:v1, codex-review-receipt:v1, or codex-review-state:v1) that names dd2b6f60f3e40e4f677a42bc91832235c3c14a2a, is complete, and has no unresolved finding
  • one clearing label recorded on that exact head (owner-approved only by the owner, or agent-approved by a writer)

Branch protection, GitHub secret scanning, and push protection are not enabled by these files. The skill texts are not installed in a Grok Bot. See docs/activation-gaps.md and docs/install.md.

Open in Web Open in Cursor 

Vendor the selected MIT skills, add research-only adapters, and
wire review and secret-scan workflows without a deploy path.

Co-authored-by: Pigbibi <Pigbibi@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T22:16:09.678517Z 4746bdd PR opened
🔒 Security Review ✅ Completed 2026-11-23T22:17:06.429775Z 4746bdd PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 4746bddc61

ℹ️ 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".

Comment thread ira/card.py Outdated
Comment on lines +181 to +184
published = [item["at"] for item in times if item["role"] == "published"]
if published:
newest = max(published)
age_days = (as_of.date() - newest.date()).days

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 Associate freshness timestamps with the primary evidence URL

When a card contains an old primary source and a recent timestamp for an unrelated URL, the validator accepts it as supported: published collects every source timestamp and max() selects the unrelated recent one. This also allows primary evidence with no retrieval timestamp of its own to pass. For example, changing the synthetic example's primary URL to an old article and adding its 2025 publication time still returns no errors because the original 2026 timestamps remain. Match timestamps to the primary evidence URLs before using them to establish retrieval and freshness.

Useful? React with 👍 / 👎.

Comment thread ira/card.py Outdated
Comment on lines +136 to +137
state = card["evidence_state"]
if state not in EVIDENCE_STATES:

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 Validate the evidence-state type before set membership

When a decoded JSON card supplies an array or object for evidence_state, this membership test raises TypeError instead of returning validation errors. Both validate_card({... , "evidence_state": []}) and the object-valued equivalent reproduce the exception with otherwise valid example data. Since this function is the public card validator and explicitly accepts arbitrary input, malformed model-generated cards should be rejected through its error-list contract rather than terminate the caller. Check that the state is a string before testing membership.

Useful? React with 👍 / 👎.

Comment thread ira/card.py Outdated
Comment on lines +309 to +310
if state == "rumor" and _RUMOR_VERIFIED.search(value):
errors.append("rumor state cannot be described as verified")

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 Account for negation when checking rumor confidence text

For a rumor card, a confidence explanation such as This rumor is not confirmed by any primary source. is rejected because the regex matches confirmed without considering negation. The same happens with the Simplified Chinese explanation 这条传闻尚未获得一手来源支持,不能视为已证实。. Both explicitly preserve uncertainty, as the research workflow requires, but an otherwise valid card receives rumor state cannot be described as verified. Distinguish affirmative verification claims from negated statements so compliant rumor explanations can pass.

Useful? React with 👍 / 👎.

Reject non-string evidence states, keep negated rumor denials, and
judge freshness from each primary URL.

Co-authored-by: Pigbibi <Pigbibi@users.noreply.github.com>
@qsl-ai-reviewer

Copy link
Copy Markdown

AI Code Review (opencode / google/gemini-4-hydrogen)

Batch 1: Batch 1/3 adds pinned governance workflows, documentation, adapters, local skills, schema, and deterministic Python contract tests without exposing secrets or allowing execution. No high or medium severity defects were found; a few low-severity validation and hygiene strictness gaps remain. Batch 2: Reviewed batch 2/3 containing unmodified third-party MIT license and vendored skill Markdown files under third_party/ (adversarial-review, bear-case, catalyst-calendar, earnings-preview). No code bugs, security leaks, or unresolved high/medium issues were found in these files. Batch 3: Reviewed Batch 3/3 containing the vendored InvestSkill markdown files (etf-analysis and fact-check) and upstream/manifest.json. The vendored skill files are unaltered MIT-licensed documentation/prompt definitions, and upstream/manifest.json cleanly records full commit SHAs, byte counts, SHA-256 hashes, and git blob SHA-1 digests for the pinned third-party artifacts. No correctness bugs, security leaks, or architecture boundary violations were found in this batch.

Reviewed commit: dd2b6f60f3 · Coverage: complete · Unresolved findings: false

Findings

  • [LOW] ira/card.py: _figures does not verify that name, value, and unit are non-empty strings (allowing e.g. null or numeric values that violate schema/research-card.schema.json) and does not check figure published_at/retrieved_at against as_of.
  • [LOW] ira/hygiene.py: private_path_findings flags .env, *.pem, .key, and specific directories, but does not check .env. (such as .env.local), secrets/, or private/ listed in .gitignore.
  • [LOW] tests/test_repo_contracts.py: Line 77 asserts pull_request_target is absent for non-risk-gate workflows immediately before appending to privileged, making the privileged list check unreachable.
  • [LOW] third_party/investskill/plugins/us-stock-analysis/skills/bear-case/SKILL.md: Vendored InvestSkill prompts (bear-case, catalyst-calendar, earnings-preview) emit BUY/HOLD/SELL action blocks and reference companion skills not vendored here (e.g., stock-eval, options-analysis, thesis-tracker); ensure the repository's research-only adapters clearly override execution-oriented action fields.

Keep pull-request gates and manual dispatch, and record that
agent-approved is not an owner confirmation.

Co-authored-by: Pigbibi <Pigbibi@users.noreply.github.com>
@cursor

cursor Bot commented Nov 23, 2026

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@qsl-ai-reviewer

Copy link
Copy Markdown

AI Code Review (opencode / google/gemini-4-hydrogen)

Batch 1: Reviewed Batch 1/3 covering governance workflows, documentation, adapters, JSON schema, Python validation/hygiene/provenance modules, and contract tests. No high or medium severity bugs, security leaks, or boundary violations were found; only minor low-severity code hygiene observations remain. Batch 2: Reviewed Batch 2/3 containing vendored third-party MIT licenses and unmodified upstream skill markdown files (adversarial-review, bear-case, catalyst-calendar, earnings-preview). No security leaks, malformed files, or defects found in these vendored artifacts. Batch 3: Batch 3/3 contains two verbatim MIT-licensed InvestSkill markdown files (etf-analysis and fact-check) and upstream/manifest.json pinning upstream commits, licenses, and file digests. No correctness bugs, security leaks, architecture boundary violations, or missing tests were found in this batch.

Reviewed commit: bddba1ced5 · Coverage: complete · Unresolved findings: false

Findings

  • [LOW] ira/card.py: In _confidence(), the early return when len(value.strip()) < 20 makes _BARE_PROBABILITY.fullmatch() unreachable for short bare values like '0.82', '82%', 'HIGH', or '概率: 0.8' (which are still rejected, but with the length message rather than the bare-probability message).
  • [LOW] ira/hygiene.py: private_path_findings() checks for exact '.env' filenames, whereas .gitignore also lists '.env.*'; environment variants like '.env.local' or '.env.prod' would not be flagged by private_path_findings().
  • [LOW] tests/test_repo_contracts.py: test_governance_workflows_are_pinned_and_unprivileged() immediately asserts self.assertNotIn('pull_request_target', text) for non-risk-gate workflows, making the subsequent privileged list accumulation and self.assertEqual(privileged, []) check redundant.

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.

2 participants