Commit Graph

164 Commits

Author SHA1 Message Date
Karan Desai b70759fda0 Merged in hotfix/exhibit-header-in-tables (pull request #987)
Hotfix/exhibit header in tables

* Merged in feature/FixplaceholderIssue (pull request #977)

Remove curly braces from echo statements in dev->stg

* Remove curly brances from echo statements in dev->stg

* Removed curly braces in echo statements in feature-> dev gate


Approved-by: Sujit Deokar

* Merged in feature/standardized-services (pull request #958)

Feature/standardized services

* service term standardization

* prompt update

* prompt updates for standardization

* only service standardization

* new file

* add supporting files and test scripts for standardization work

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* remove old files

* Merge remote-tracking branch 'origin/dev' into feature/standardized-services

* final fixes

* Merged dev into feature/standardized-services

* additional features

* removed  unwanted files

* remove unwanted files

* Merge branch 'dev' into feature/standardized-services

* Merge remote-tracking branch 'origin/dev' into feature/standardized-services

* reversed  vendor changes

* Merged dev into feature/standardized-services

* addressed PR comments

* Merge branch 'dev' into feature/standardized-services

* Merged dev into feature/standardized-services

* addressed 3 remaining comments inPR

* black formatting

* incorporated feedback from AI c…
* prompt added for amendment intent

* amendment intent language

* update field name

* amendment intent tag

* prompt update

* Merge remote-tracking branch 'origin/dev' into feature/active-rates

* Merge remote-tracking branch 'origin/dev' into feature/active-rates

* remove docusign lines

* add unit tests for clean_header_footer docusign/deleted_lines changes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* black forrmatting

* Merge branch 'feature/active-rates' into temp-branch

* initial commit

* exhibit header in table

* Merge branch 'temp-branch' into hotfix/exhibit-header-in-tables

* exhibit header within table

* Merge branch 'dev' into hotfix/exhibit-header-in-tables

* deduplicaton prompt update

* foramatting

* removed amend intent code

* Merged dev into hotfix/exhibit-header-in-tables

* added keywords to constants

* changes reverted

* formatting


Approved-by: Katon Minhas
2026-04-30 17:59:09 +00:00
Aditi Agarwal 3ccd901743 Merged in feature/fixPlaceholder2 (pull request #979)
Updated feature> dev gate to print variables of echo statements

* Updated feature> dev gate to print variables of echo statement

* Reverted placeholder changes


Approved-by: Sujit Deokar
2026-04-22 10:06:08 +00:00
Aditi Agarwal a0effa87f2 Merged in feature/FixplaceholderIssue (pull request #977)
Remove curly braces from echo statements in dev->stg

* Remove curly brances from echo statements in dev->stg

* Removed curly braces in echo statements in feature-> dev gate


Approved-by: Sujit Deokar
2026-04-20 11:53:09 +00:00
Sujit Deokar 38ae8c64ba Merged in feature/upDatepipelinesFile (pull request #971)
Feature/upDatepipelinesFile

* Added logic to capture failure status for invalid branch names

* Merged dev into feature/upDatepipelinesFile

* Bugfix the print logs were not able to populate the placeholders. These are now fix to use the sh file

* Merge branch 'dev' into feature/upDatepipelinesFile
2026-04-17 14:17:38 +00:00
Sujit Deokar 1527fbc740 Merged in feature/upDatepipelinesFile (pull request #963)
Added logic to capture failure status for invalid branch names

* Added logic to capture failure status for invalid branch names

* Merged dev into feature/upDatepipelinesFile
2026-04-17 12:15:30 +00:00
sujit deokar 72ccdcd341 harden pipeline: improve security for OIDC token handling and add version component validation 2026-04-16 11:49:33 +00:00
sujit deokar fda9c2b243 enhance pipeline: add validation for release tag format and improve AI code review steps
remove duplicate lint, type and unit test validation from PR pipeline.
2026-04-16 10:44:00 +00:00
sujit deokar d9acfc7cc7 Based on code review feedback, made the changes. 2026-04-16 08:55:49 +00:00
Siddhant Medar e94c5e0100 apply two real items from second PR review round
1. Tag format validation in release-prod (MEDIUM, defensive).
   Before parsing major/minor/patch from the latest tag, assert it
   matches ^v[0-9]+\.[0-9]+\.[0-9]+$. Empirically tested: catches
   v1, v1.2, v1.2.3.4, v1.0.0-rc1, v1.2.3-beta+build, and still
   accepts v0.0.0 (the first-release fallback).

   Without this, bash arithmetic silently mangles non-semver tags
   into wrong results via its 'treat empty/non-numeric as 0' rule.
   Worst case: tag 'v1' → cut -d. -f2/-f3 both return '1' →
   minor bump produces v1.1.2 instead of v1.0.1. No visible error.

2. Rewrite the AI review comment to match actual behavior.
   The old comment said 'advisory, not a gate' but also admitted
   git clone / apt-get are hard failures, contradicting itself.
   The new comment makes the runtime vs. infrastructure distinction
   explicit: runtime failures (agent crash, STS errors, Python
   exceptions) become warnings via || echo; infrastructure failures
   (missing token, clone failure, apt-get failure) stay hard.

   This is a doc fix, not a code change. Deliberately preserving
   the hard-fail behavior on config errors because silent
   degradation of AI review is the worst outcome — feature
   disappears from CI with no signal.

Explicitly rejected from the second review (empirically verified):
- Gate logic 'fragile' claim: tested in bash, correct for all
  our hardcoded ALLOWED values.
- ROLLBACK_TAG -z check 'passes empty': tested, -z correctly
  catches empty strings. Reviewer has the semantics wrong.
- chmod 600 + set +x: our comment already documents chmod 600
  as cosmetic/scanner-silencing; set +x wouldn't help because
  Bitbucket's line-echo is runner-level, not bash set -x.
- cd/python refactor (previous round): already rebutted in
  commit 4836e36f via empirical bash AND-OR list tests.
- Option B for git clone wrapping: silent degradation of
  config errors is worse than the current loud-fail behavior.
2026-04-15 13:48:17 -05:00
Siddhant Medar 4836e36f65 harden pipeline per PR review: locked lockfile, token permissions, image comment
1. Replace 'uv sync --frozen' with 'uv sync --locked'. --frozen silently
   uses a stale lockfile if pyproject.toml is updated without regenerating
   uv.lock, masking missed dependencies. --locked fails loudly with a clear
   error when the lockfile is out of sync. Verified empirically with uv
   0.9.14: --frozen exits 0 on mismatch, --locked exits 1.

2. Add 'chmod 600' on the OIDC token file after writing it. The container
   is already single-user root so this is defensive/cosmetic, but it
   silences security scanners and signals intent.

3. Add a comment explaining why gate steps use atlassian/default-image:4
   instead of python:3.12.7 (gates run bash only, no Python toolchain
   needed — lighter image, faster pull).

Explicitly rejected from the PR review:
- Token-masking sed mitigation (delimiter collision with / in real
  Bitbucket clone tokens; cmd | sed || exit 1 swallows git failures
  without set -o pipefail). Bitbucket's built-in Secured variable
  masking is the correct mitigation and is already documented as a
  setup requirement.
- SSH key alternative for git clone (architecturally worse — more
  secrets to manage; HTTPS+Secured is the Bitbucket-recommended pattern).
- cd/python refactor ('fragile logic bug'). Verified empirically that
  'cd X && python Y || echo Z' with set -e correctly catches both
  cd and python failures via the ||. The step exits 0 as intended
  by the 'advisory, not a gate' design. The suggested refactor would
  introduce a hard-fail regression.
2026-04-15 09:01:35 -05:00
Siddhant Medar 2a0617cd79 fix: escape colon in WARNING message to prevent YAML mapping parse
The unquoted ': ' (colon + space) in 'WARNING: AI review step failed'
was being interpreted as a YAML mapping key-value separator, causing
the entire script item to be parsed as a dict instead of a command
string. Bitbucket then rejected it with 'Missing or empty command
string' error at pull-requests > feature/* > 2 > step > script > 9.

Replaced the colon with a hyphen. Validated with yaml.safe_load that
all 10 script items in the ai-code-review step now parse as strings.
2026-04-14 16:43:59 -05:00
Siddhant Medar cbe941a7d2 fix: move indented comment to correct indentation in ai-code-review
Bitbucket's YAML parser was interpreting the deeper-indented comment
after the printf line as a phantom empty list item, causing a
'Missing or empty command string' error at script item 9.
2026-04-14 16:31:18 -05:00
Siddhant Medar f3a36eea1e fix: harden bitbucket-pipelines.yml with security and correctness improvements 2026-04-14 16:24:40 -05:00
Aditi Agarwal 6058ab0b7f Update bitbucket pipelines 2026-04-14 20:51:06 +05:30
Sujit Deokar 238b49a04a Merged in feature/DAIP2-1575-set-up-dev-prod-uat-branches- (pull request #931)
Feature/DAIP2-1575 set up dev prod uat branches

* Add branch promotion gates and release pipelines

* Add resolve_source_branch.sh script and update .gitignore; fix pipeline step name casing 'dev'

* Add AI code review step and refactor branch resolution in pipelines

* Merged dev into feature/DAIP2-1575-set-up-dev-prod-uat-branches-

* Merged dev into feature/DAIP2-1575-set-up-dev-prod-uat-branches-

* Merged dev into feature/DAIP2-1575-set-up-dev-prod-uat-branches-


Approved-by: Katon Minhas
2026-04-02 19:42:12 +00:00
Siddhant Medar ec0b758bd5 Merged in feature/ai-pr-review-agent (pull request #906)
Add AI code review agent to pull request pipeline

* Add AI code review agent to pull request pipeline

Adds a pull-requests pipeline that runs CI checks (lint, type check,
unit tests) followed by an AI code review step. The AI review uses
OIDC to authenticate with AWS Bedrock - no hardcoded AWS keys. It
clones the code-review-agent repo and posts a review comment on the PR.

* Fix AI code review step: install git in python:3.12-slim image

* Trigger pipeline

* Trigger pipeline

* Trigger pipeline

* Trigger pipeline

* Trigger pipeline

* Trigger pipeline

* Trigger pipeline

* Remove debug token decode line

* Update guide: all checklist items complete, agent working

* Remove guide file from repo

* Trigger pipeline


Approved-by: Katon Minhas
2026-03-10 22:02:53 +00:00
Katon Minhas afb6d5185d Merged in feature/lesser-table-caching-refactor-hybrid (pull request #847)
Feature/lesser table caching refactor hybrid

* chore: Remove unused duplicate main.py from shared pipeline

* fix: Correct crosswalk paths in aarete_derived.py

* chore: Remove unused documentation files from fieldExtraction

* docs: Add documentation files to documentation folder

* docs: Update README with uv setup, expanded project structure, and branching conventions

* docs: Add uv installation steps with Ubuntu/WSL emphasis

* Enable prompt caching for all remaining LLM calls

- Add _INSTRUCTION() functions for: EXHIBIT_HEADER, EXHIBIT_LINKAGE,
  EXHIBIT_TITLE_MATCH, DATE_FIX, DERIVED_TERM_DATE, CHECK_PROVIDER_NAME_MATCH,
  SPECIAL_CASE_ASSIGNMENT
- Update all invoke_claude() calls in saas and clover pipelines to use
  cache=True with corresponding _INSTRUCTION() functions
- Add new instructions to get_cacheable_instructions() for cache warming
- Update tests for new instruction functions

Functions now using caching:
- prompt_exhibit_level
- prompt_exhibit_lesser (EXHIBIT_LEVEL_LESSER_OF)
- prompt_fee_schedule_breakout
- prompt_grouper_breakout
- prompt_special_case_assignment
- prompt_exhibit_linkage
- prompt_exhibit_header
- prompt_smart_chunked (ONE_TO_ONE templates)
- prompt_date_fix
- prompt_derived_term_date
- prompt_exhibit_title_match
- provider_name_match_check

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Reorder

* feat: Add bcbs_promise client pipeline with OFFSET_TERM extraction

- Add new bcbs_promise client with HSC-based OFFSET_TERM field extraction
- Extract full paragraph text of offset/recoupment provisions from contracts
- Derive OFFSET_INDICATOR (Y/N) from OFFSET_TERM presence
- Fix reorder_columns to preserve extra columns not in COLUMN_ORDER
- Update QC/QA output path to outputs/qc_qa/

* fix: Update dev deps and test assertions for QC/QA output path

- Add pytest/pytest-mock to dev dependencies for mypy type checking
- Update test assertions to expect outputs/qc_qa instead of qa_qc_output

* style: Apply black formatting to prompt_templates.py

* Merge main, move scripts

* Archive some scripts

* update py version

* remove .py version file

* Remove ASCII characters

* Restore testbed code

* restore tracking

* Update testbed metrics

* Enable prompt caching for CODE_LAST_CHECK, FILL_BILL_TYPE, DUAL_LOB_CHECK, and GROUPER_BREAKOUT

- Add CODE_LAST_CHECK_INSTRUCTION() for service specificity classification
- Add FILL_BILL_TYPE_INSTRUCTION() for bill type code determination
- Add DUAL_LOB_CHECK_INSTRUCTION() for Medicare/Medicaid classification
- Update code_funcs.py to use caching for CODE_LAST_CHECK, FILL_BILL_TYPE, GROUPER_BREAKOUT
- Update postprocessing_funcs.py to use caching for DUAL_LOB_CHECK
- Add new instructions to get_cacheable_instructions() for cache warming
- Add unit tests for new instruction functions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix postprocessing_funcs to remove invalid columns

* Merge branch 'main' into feature/lesser-table-caching-refactor-hybrid

* Revert prompt caching changes from aed1b73c

* update formatting

* Update imports


Approved-by: Sha Brown
Approved-by: Praneel Panchigar
2026-01-26 16:52:55 +00:00
Michael McGuinness 533ddc38a9 Merged in bugfix/actualPipes (pull request #251)
Bugfix/actualPipes

* actual

* actual


Approved-by: Alex Galarce
2024-10-29 15:45:48 +00:00
Michael McGuinness 7cb0b485ad Merged in feature/unittestframe (pull request #240)
Unit Testing Framework

* emptyframe

* fixstatic

* save

* exampletest

* rmreqs

* rmUto


Approved-by: Alex Galarce
2024-10-22 13:45:53 +00:00
Michael McGuinness 815fa7f0bc Merged in feature/poetry (pull request #238)
Draft: Adding Poetry

* addpoetry

* pipes

* mypy

* streamlit

* searchforchange


Approved-by: Alex Galarce
2024-10-15 16:20:27 +00:00
Michael McGuinness 168d197349 Merged in feature/lightStaticTypes (pull request #234)
Add static type check

* artifacts

* dockerfileforall

* examplemypystep

* reqs

* baseMain

* oneperservice

* somebasicchanges

* deps

* removedeps

* removeerrs

* singlecommand

* lessargs

* 312base

* versionanderr

* pythonversion

* ithinkfinalerrs

* numpyv

* versionsandconditional

* changesets

* tryagain

* lint

* numpyagain

* init

* clearstreamlit

* forcestreamlit


Approved-by: Umang Mistry
2024-10-11 15:26:16 +00:00
Michael McGuinness 20b01d442c Merged in feature/dryRuns (pull request #232)
Add dry runs

* adddryruns

* status


Approved-by: Umang Mistry
2024-10-09 14:03:16 +00:00
Michael McGuinness 8cee69372b keepUATplan 2024-10-07 18:04:17 +01:00
Michael McGuinness 550bfcc0ed changes 2024-10-07 18:02:57 +01:00
Michael McGuinness 2ca5fa5f4c removedeploy 2024-10-07 17:27:37 +01:00
Michael McGuinness 9dfccfa3db location 2024-10-07 17:21:20 +01:00
Michael McGuinness 64ffdcfcbf removedev 2024-10-07 17:06:54 +01:00
Michael McGuinness 479a877973 syntax 2024-10-07 16:58:45 +01:00
Michael McGuinness 7f952c0a2c allowDeploy 2024-10-07 16:57:55 +01:00
Michael McGuinness 59934af0c9 useterra 2024-10-07 16:55:47 +01:00
Michael McGuinness fb8f242387 testprod 2024-10-04 16:45:10 +01:00
Michael McGuinness d5d5866a9e plan 2024-10-04 16:38:59 +01:00
Michael McGuinness 1c8ab82793 Merged in feature/prodpreuat (pull request #225)
Prod Pre UAT

* merge


Approved-by: Umang Mistry
2024-10-04 15:33:17 +00:00
Michael McGuinness b5d400dfe2 Merged in bugfix/deployConfigProperties (pull request #224)
Bugfix/deployConfigProperties

* syncconfig

* copydir

* specbucket

* pipplusdevdeploy

* struct

* script

* image

* cleanup

* testplan

* addallplans

* stepnames
2024-10-04 15:26:57 +00:00
Michael McGuinness fa5e80c8cd Merged in feature/applyBeforeDeploy (pull request #223)
Apply Before Deploy

* firstround

* rerun


Approved-by: Umang Mistry
2024-10-04 12:13:41 +00:00
Michael McGuinness 4abcd2dd16 onlydeployfrommain 2024-09-30 16:26:01 +01:00
Michael McGuinness dccadf980f clean 2024-09-30 16:26:01 +01:00
Michael McGuinness 14139df124 pipelineorder 2024-09-30 16:26:01 +01:00
Michael McGuinness cc99ab10f3 addsessionname 2024-09-30 16:26:01 +01:00
Michael McGuinness 150aa0b4b3 envvars 2024-09-30 16:26:01 +01:00
Michael McGuinness c2300a7c35 awslogin 2024-09-30 16:26:01 +01:00
Michael McGuinness 34e9e40605 stagingtouat 2024-09-30 16:26:01 +01:00
Michael McGuinness 5952f8f185 isolatesteps 2024-09-30 16:26:01 +01:00
Michael McGuinness bb5b010cde isolatesteps 2024-09-30 16:26:01 +01:00
Michael McGuinness d1afc1fc3e echovars 2024-09-30 16:26:01 +01:00
Michael McGuinness ef9be200eb pipel 2024-09-30 16:26:01 +01:00
Michael McGuinness a84a837541 add pipeline 2024-09-30 12:25:32 +01:00
Michael McGuinness e0361d8a1f onlymain 2024-09-24 18:02:31 +01:00
Michael McGuinness 35b221d01f dev 2024-09-24 18:01:00 +01:00
Michael McGuinness 474bab2154 makestrig 2024-09-24 17:59:40 +01:00