Skip to content

feat: add mock conductor script for local testing#239

Draft
danielpeng1 wants to merge 1 commit into
masterfrom
WCN-930/mock-conductor-script
Draft

feat: add mock conductor script for local testing#239
danielpeng1 wants to merge 1 commit into
masterfrom
WCN-930/mock-conductor-script

Conversation

@danielpeng1

Copy link
Copy Markdown
Contributor

Very preliminary mock OSO conductor script for M1 E2E document shuttling between FE and BE plugins. Will update contents in this folder as things develop. No E2E validation yet without the FE/BE plugin implementation.

  • scripts/mock-conductor/mock_conductor.py adapted from JY's osotester.py (HTTP default since this is local, but optional USE_TLS is possible)
  • Add requirements.txt, .env.example, and short README.md with install/run steps
  • Poll FE GET /documents → POST BE → GET BE → POST FE with [CYCLE] doc- count logging

Ticket: WCN-930

@danielpeng1 danielpeng1 self-assigned this Jun 15, 2026
@linear-code

linear-code Bot commented Jun 15, 2026

Copy link
Copy Markdown

WCN-930

@danielpeng1 danielpeng1 marked this pull request as ready for review June 15, 2026 17:01
@danielpeng1 danielpeng1 requested review from a team as code owners June 15, 2026 17:01

from jsonschema import ValidationError, validate

FRONTEND_HOST = os.environ["FRONTEND_HOST"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

os.environ[...] raises KeyError at import time if the var isn't set. gives a cryptic traceback instead of pointing to the README.

ctx.load_verify_locations(CA_CERT)
else:
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

when USE_TLS=true but CA_CERT is unset, verification is silently disabled. worth a print("WARNING: TLS enabled but CA_CERT not set, skipping cert verification") here so it's obvious.

@danielpeng1 danielpeng1 marked this pull request as draft June 15, 2026 23:31

@pranishnepal pranishnepal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

being discussed - drafted

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