Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
1669b0d
fail fast when forgevm url set without token
heitorrosa Sep 12, 2026
8a224f4
retry field data load after failure instead of caching empty
heitorrosa Sep 12, 2026
a09f906
fix prometheus memory async cache deadlock
heitorrosa Sep 12, 2026
378c191
add atomic snapshot to stocks cache reads
heitorrosa Sep 12, 2026
2f57a08
rename thread safety tests to match pytest pattern
heitorrosa Sep 12, 2026
1c9fd01
config is handled by config.py
heitorrosa Sep 12, 2026
8b50333
fix exact search collapsing stock snapshots
heitorrosa Sep 12, 2026
c8c5881
merge sync/async memory twins
heitorrosa Sep 13, 2026
b7df704
prune query.py p2 lane into baseframe and finalize helpers
heitorrosa Sep 13, 2026
0699f81
remove over-engineered helpers in memory vector key cache and compress
heitorrosa Sep 13, 2026
870f2f8
simplify chat history compact sandbox controller auth and startup hel…
heitorrosa Sep 13, 2026
098a77b
normalize TIME column to date strings before cotation filtering
heitorrosa Sep 13, 2026
8386eca
remove uncalled write_bytes helper from sandbox manager
heitorrosa Sep 13, 2026
9d1d368
merge micro test files into module mates
heitorrosa Sep 13, 2026
e8c7568
trim dead ci docker and compose lines
heitorrosa Sep 13, 2026
f49252b
restore write_bytes helper used by workspace tests
heitorrosa Sep 13, 2026
c87942b
remove write-never fixed counter from ci
heitorrosa Sep 13, 2026
9cb8f24
remove underscore prefix from private helpers
heitorrosa Sep 13, 2026
8e244c4
collapse async memory twins into sync asyncio.run wrappers
heitorrosa Sep 13, 2026
356707d
graphify
heitorrosa Sep 13, 2026
64f735f
make feather cache build reconnect safe on mysql lost connection
heitorrosa Sep 14, 2026
236df8c
delete write_bytes helper keeping write_file
heitorrosa Sep 14, 2026
551242d
make sync cache decorator async capable
heitorrosa Sep 14, 2026
5a7a72d
prune dead ci and docker config lines
heitorrosa Sep 14, 2026
12302b5
fix cache decorator shadowing cashews setup in stocks controller
heitorrosa Sep 14, 2026
d755434
trim over-engineered prometheus helpers
heitorrosa Sep 14, 2026
7e9e8da
shrink cotation pipe-encoding to nested only
heitorrosa Sep 14, 2026
d859534
trim over-engineered api auth and util helpers
heitorrosa Sep 14, 2026
d12f658
trim redundant test helpers and duplicate coverage
heitorrosa Sep 14, 2026
da61e77
fix logging tests hanging on real listener thread and network post
heitorrosa Sep 14, 2026
d6bd668
restore pagination boundary tests against real endpoint
heitorrosa Sep 14, 2026
c70c134
remove unused stocksapi quota settings fields
heitorrosa Sep 14, 2026
121e2c7
restore ci docker compose file per refused ruling
heitorrosa Sep 14, 2026
7b6fb34
todo
heitorrosa Sep 14, 2026
78084c0
ci
heitorrosa Sep 14, 2026
5ad08ba
handled by the config
heitorrosa Sep 14, 2026
c6db351
doc
heitorrosa Sep 15, 2026
975004e
replace bespoke retry with tenacity
heitorrosa Sep 15, 2026
ec0fd7b
replace hand sse with sse-starlette
heitorrosa Sep 15, 2026
3118a54
fuzzy match memory keys with rapidfuzz
heitorrosa Sep 15, 2026
1f22af2
validate llm extraction with pydantic
heitorrosa Sep 15, 2026
5bdf12d
parse device fields with user-agents
heitorrosa Sep 15, 2026
043f4aa
bound token cache with ttlcache
heitorrosa Sep 15, 2026
456aab6
adopt pytest plugins for async time and http
heitorrosa Sep 15, 2026
388442e
replace static fixtures with factories
heitorrosa Sep 15, 2026
f4e8f0b
fix reviewer nits from adopt-libs lanes
heitorrosa Sep 15, 2026
e9dbba6
fix memory limit test with dissimilar uuid keys
heitorrosa Sep 15, 2026
b1d208f
fix missing await in mcp middleware test
heitorrosa Sep 15, 2026
f00ba86
format blank line after token cache factory
heitorrosa Sep 15, 2026
3720c72
format session middleware call
heitorrosa Sep 15, 2026
9befb75
format redundant await parens in mcp pool tests
heitorrosa Sep 15, 2026
1cf3a46
format health cache age assertion line
heitorrosa Sep 15, 2026
66d574e
fix conftest e402 noqa
heitorrosa Sep 15, 2026
04fb48a
fix getcurrentuser sessionmanager patch target
heitorrosa Sep 15, 2026
9f1af4c
fix sandbox empty token test to match passthrough
heitorrosa Sep 15, 2026
07514b8
add xango stub for status endpoint tests
heitorrosa Sep 15, 2026
27638f2
graphify
heitorrosa Sep 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,14 @@ Rules:
- Before answering architecture or codebase questions, read graphify-out/GRAPH_REPORT.md for god nodes and community structure
- If graphify-out/wiki/index.md exists, navigate it instead of reading raw files
- For cross-module "how does X relate to Y" questions, prefer `graphify query "<question>"`, `graphify path "<A>" "<B>"`, or `graphify explain "<concept>"` over grep — these traverse the graph's EXTRACTED + INFERRED edges instead of scanning files
- After modifying code files in this session, run `graphify update .` to keep the graph current (AST-only, no API cost)
- After modifying code files in this session, run `graphify update .` to keep the graph current (AST-only, no API cost)

## Swarm Delegation (default)

- All 3+ step tasks: `create_goal` + `todowrite` lanes (one todo per lane) + `delegate()` fan-out, one call per lane in one turn.
- Background by default, blocking by exception (`task()` only for mutations prime must supervise).
- Every lane returns an envelope: `Status: / Mutations: / Edge-Cases: / Deliverables:` ≤300 words + `file:line`.
- Verify every lane: `git --no-pager log --oneline -N` + real test output. Never report a delegate's commits/tests as fact.
- One commit per lane (`simple-commits`: lowercase, one logical change). Full `.\ci.ps1` before push.
- Always `git --no-pager` on diff/log/show/status. Never `Get-Content -Wait` — poll with `Get-Content -Tail N`.
- Standing bans: NEVER run any `TestStocksCacheManager::test_getCachedStocks_*` (spawns real cache build, stalls ~1hr — always `-k "not test_getCachedStocks_"`); never run bare pytest, only `.\ci.ps1`; never touch `stash@{1}` or foreign stashes.
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \

COPY requirements.txt .

RUN --mount=type=cache,target=/root/.cache/pip \
pip install --upgrade pip && \
RUN pip install --upgrade pip && \
pip install --no-cache-dir --prefix=/install \
torch --index-url https://download.pytorch.org/whl/cpu && \
pip install --no-cache-dir --prefix=/install \
Expand Down Expand Up @@ -38,7 +37,4 @@ WORKDIR /

COPY . .

# defer embedding model download to runtime — saves ~500MB from image
# RUN python -c "from main.utils.models.loader import getEmbeddingModel; getEmbeddingModel()"

CMD ["python", "run.py"]
3 changes: 3 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
- [ ] Implement an user management system so the user can customize its name, change password, profile picture and settings
- [ ] Make an Password Recovery system and 2FA using the Email Protocol

- [ ] the scraper rentability should be calculated based on the COTACOA 10Y AJUSTADA instead of the tradingview endpoint
- [ ] add MACD, RSI and other metrics

- [ ] Use the ForgeVM architecture to expose MetaTrader5 terminals

- [ ] Abacate Pay
Expand Down
14 changes: 1 addition & 13 deletions ci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ param(
$ErrorActionPreference = "Continue"
$script:failed = @()
$script:passed = @()
$script:fixed = @()

function Write-Step {
param([string]$label)
Expand All @@ -45,12 +44,6 @@ function Write-Fail {
$script:failed += $label
}

function Write-Fix {
param([string]$label)
Write-Host " FIXED $label" -ForegroundColor Yellow
$script:fixed += $label
}

function Run-Check {
param([string]$label, [string]$cmd, [bool]$critical = $true)
Write-Step $label
Expand Down Expand Up @@ -120,8 +113,7 @@ if ($runAll -or $Typecheck) {
if ($Fast) {
Write-Step "mypy (skipped in fast mode)"
} else {
# Run mypy with --no-error-summary for cleaner output
# mypy doesn't have an auto-fix mode, but we show clear errors
# mypy has no auto-fix mode; errors print inline below
Write-Step "mypy Typecheck"
$mypyOutput = & mypy main/ 2>&1
$mypyExit = $LASTEXITCODE
Expand Down Expand Up @@ -172,10 +164,6 @@ Write-Host ""
Write-Host "========================================"
Write-Host " SUMMARY"
Write-Host "========================================"
if ($script:fixed.Count -gt 0) {
Write-Host " Auto-fixed: $($script:fixed.Count)" -ForegroundColor Yellow
foreach ($f in $script:fixed) { Write-Host " - $f" -ForegroundColor Yellow }
}
Write-Host " Passed: $($script:passed.Count)" -ForegroundColor Green
if ($script:failed.Count -gt 0) {
Write-Host " Failed: $($script:failed.Count)" -ForegroundColor Red
Expand Down
6 changes: 2 additions & 4 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
def applyIPv4Force():
_old_getaddrinfo = socket.getaddrinfo

def _new_getaddrinfo(*args, **kwargs):
def new_getaddrinfo(*args, **kwargs):
res = _old_getaddrinfo(*args, **kwargs)
return [r for r in res if r[0] == socket.AF_INET]

socket.getaddrinfo = _new_getaddrinfo
socket.getaddrinfo = new_getaddrinfo


applyIPv4Force()
Expand Down Expand Up @@ -53,8 +53,6 @@ class StocksApiSettings(BaseSettings):
PORT: int = Field(default=3200, validation_alias=AliasChoices("STOCKSAPI_PORT"))
KEY_SYSTEM: bool = Field(default=False, validation_alias=AliasChoices("STOCKSAPI_KEY.SYSTEM"))
KEY: str = Field(default="", validation_alias=AliasChoices("STOCKSAPI_PRIVATE.KEY"))
DEFAULT_QUOTA: int = Field(default=100, validation_alias=AliasChoices("STOCKSAPI_DEFAULT.QUOTA"))
QUOTA_RESETDAYS: int = Field(default=30, validation_alias=AliasChoices("STOCKSAPI_QUOTA.RESETDAYS"))
model_config = SettingsConfigDict(env_file=".env", extra="ignore")


Expand Down
22 changes: 13 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ services:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: mansa_db
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-password}
MYSQL_DATABASE: ${MYSQL_DATABASE:-mansa_db}
MYSQL_USER: ${MYSQL_USER:-user}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-password}
ports:
- "3306:3306"
volumes:
Expand Down Expand Up @@ -42,8 +42,6 @@ services:
build:
context: .
dockerfile: Dockerfile
cache_from:
- server-api:latest
restart: always
ports:
- "8000:8000"
Expand All @@ -54,14 +52,20 @@ services:
- DEBUG_MODE=TRUE
- TZ=America/Sao_Paulo
- FORGEVM_API_TOKEN=${FORGEVM_API_TOKEN:-}
- USER_MYSQL_HOST
- USER_MYSQL_USER
- USER_MYSQL_PASSWORD
- USER_MYSQL_DATABASE
- STOCKS_MYSQL_HOST
- STOCKS_MYSQL_USER
- STOCKS_MYSQL_PASSWORD
- STOCKS_MYSQL_DATABASE
Comment on lines +55 to +62

volumes:
- .:/app
- workspaces:/data/workspaces
- stocks-cache:/app/cache

volumes:
db_data:
forgevm-data:
workspaces:
stocks-cache:
workspaces:
21 changes: 18 additions & 3 deletions graphify-out/.graphify_labels.json
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,11 @@
"492": "Community 492",
"493": "Community 493",
"494": "Community 494",
"495": "Community 495",
"496": "Community 496",
"497": "Community 497",
"498": "Community 498",
"499": "Community 499",
"500": "Community 500",
"501": "Community 501",
"502": "Community 502",
"503": "Community 503",
Expand All @@ -523,19 +523,25 @@
"522": "Community 522",
"523": "Community 523",
"524": "Community 524",
"525": "Community 525",
"526": "Community 526",
"527": "Community 527",
"528": "Community 528",
"529": "Community 529",
"530": "Community 530",
"531": "Community 531",
"532": "Community 532",
"533": "Community 533",
"534": "Community 534",
"535": "Community 535",
"536": "Community 536",
"537": "Community 537",
"538": "Community 538",
"539": "Community 539",
"540": "Community 540",
"541": "Community 541",
"542": "Community 542",
"543": "Community 543",
"544": "Community 544",
"545": "Community 545",
"546": "Community 546",
"547": "Community 547",
Expand All @@ -551,10 +557,19 @@
"557": "Community 557",
"558": "Community 558",
"559": "Community 559",
"560": "Community 560",
"561": "Community 561",
"562": "Community 562",
"563": "Community 563",
"564": "Community 564",
"565": "Community 565",
"566": "Community 566",
"567": "Community 567",
"568": "Community 568"
"568": "Community 568",
"569": "Community 569",
"573": "Community 573",
"575": "Community 575",
"576": "Community 576",
"577": "Community 577",
"580": "Community 580"
}
Loading
Loading