level: and !ENV not working, but local password: on a page is

Hi — as per title
I've stripped my project back to barebones trying to debug and figure out where I'm going wrong, but i've hit a brick wall.
mkdocs.yml config:
site_name: Test
use_directory_urls: true
nav:
  - Test: test.md
plugins:
  - search: {}
  - encryptcontent:
      password_inventory:
        secret1: 'test'
        secret2: !ENV TESTVAR
      password_button: true

test.md
---
level: secret1
---

# test heading

test page

Things are working fine using password: test as a meta tag in the test page, or setting a global_password: 'test' in mkdocs.yml
However, setting level: secret1 or level: secret2 in test.md meta tags does nothing
!ENV TESTVAR also works fine when using it to set the page title.
I feel like i'm going mad missing something obvious!?
I'm running:

python3 version 3.11.4
mkdocs version 1.5.2 from /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/mkdocs (Python 3.11)
the latest release of mkdocs-encryptcontent-plugin (downloaded 1 sep 2023) - not sure how to check this

Hi,
I've set the "version3" branch als main branch lately, because I want to release v3.x soon, which will bring features like password_inventory. But pip is still on 2.x, so If you want the documentation for the latest 2.x release, please check here.
However, there are pre-releases available to give a try, but I already found a sack full of bugs yesterday, so the latest pre-release is not on par, yet. So best do this:
pip install wheel #not sure if other packages are needed

git clone https://github.com/unverbuggt/mkdocs-encryptcontent-plugin.git
cd mkdocs-encryptcontent-plugin/
python setup.py sdist bdist_wheel
pip install --force-reinstall --no-deps dist/mkdocs_encryptcontent_plugin-3.0.0.dev3-py3-none-any.whl

That worked perfectly, thank you!
Would it be advised to switch back to a pip install once v3 is released? If so, what would be the best way to do so?

All you need to do is pip install --upgrade mkdocs-encryptcontent-plugin once v3 is released.


Add script onEntry, on Exit

the idea is to add the fluent interface for executing on entry and on exit script

https://github.com/apache/incubator-kie-kogito-runtimes/pull/3490


Way to hide attribute name from error message?

When I try to save an attribute (say, birthday) with invalid date, I get the following validation error on the form
birthday is not a valid date.
I need a way to hide the birthday part from the error message. Exposing my attribute name doesn't seem fit to me.
For eg: My database column could be named just bd or birth or anything and showing bd is not a valid date seems inappropriate.
Anyway to do this?

I think if you just add the message after the validation it overrides the default message
e.g. validates_date :birthday,  message => 'Not a valid date'

There is no feature in ActiveRecord to remove the attribute name when displaying errors using full_messages which is the default for form inputs I believe. You'd need to display the individual error message per attribute.
See Rails Guides

Hey I have the same problem,
I've checked the rails guide but couldn't find my answer.
Usually I would define a custom method with sth like this
errors.add(:base, 'You must be at least 18 years old')
but I don't know how to do it here.
Is there any way to do the same with the gem?

Does any other field you are validating that is not a datetime show the error message in a different way?


problem:the method buildStatementFromContext in XMLMapperBuilder.buildStatementFromContext always called twice.

Hello to the development team. I am a Chinese programmer.
Thank you for your contribution to the development of Mybatis framework. I found a little problem when reading the source code.
Although this problem does not affect the program working, but the program runs with unnecessary code.
that is:
the buildStatementFromContext method in the XMLMapperBuilder class. This method is only called when parsing the select | insert | delete | update tag in the mapper.xml. Different logic should be executed in the method according to the databaseId attribute of the configuration object, but the logic in the source code is: if the databaseId is null, The buildStatementFromContext method will be executed twice. Should the else tag be added here to limit the number of calls to the buildStatementFromContext method only once.
Hope to adopt,Thanks again.

Hello @sdsxdqg ,
No it should not.
If you think something is wrong with the code, what you should do is to change the code and run the tests i.e. ./mvnw clean test.
By checking the failed tests, you would understand the reason behind the implementation.

@harawata Thank you for your answer


rvc process data error

['trainset_preprocess_pipeline_print.py', 'C:\RVC-beta\RVC-beta0717\voice\kk', '40000', '3', 'C:\RVC-beta\RVC-beta0717/logs/kk', 'False']
its showing false and after process its showing training error. any solution for this false process data

请提供cmd控制台的报错

“False” doesn't mean error.
We need more information to check the issue.


Radio Button Error Labels disappear on blur

From @evmatt on February 1, 2019 9:52
In a Vaadin application running on 12.0.0 a bug has been observed on a radio button group where validation results in an error and the error message is displayed, but then disappears on blur. This does appear to be linked to vaadin/vaadin-radio-button-flow#80, but does not appear to have been solved by the related fix. Looking at the changelogs it appears that this fix should be incorporated in Vaadin 12.0.0.
I have replicated this in a Vaadin starter running Vaadin version 12.0.5. The following code replicates the issue.
public class MainView extends VerticalLayout {

	public MainView() {
		RadioButtonGroup<String> group = new RadioButtonGroup<>();
		group.setItems("foo", "bar", "baz");
		group.setLabel("Group label");
		group.setErrorMessage("Invalid");
		addBinder(group);

		add(group);
	}

	private void addBinder(RadioButtonGroup<String> group) {
		Binder<TestBean> binder = new Binder<>();
		binder.forField(group).withValidator(value -> !value.equals("baz"), "Incorrect selection").bind(TestBean::getTest, TestBean::setTest);
	}
}

TestBean is a standard bean with a single String field test and a getter and setter.
This behaviour has been observed in Chrome and Firefox.
Copied from original issue: vaadin/vaadin-radio-button#102

This issue is still present on Vaadin 14.4.2
    	RadioButtonGroup<String> rbg = new RadioButtonGroup<>();
    	rbg.setItems("valid 1", "valid 2", "invalid");
    	rbgBinder.forField(rbg)
    	         .withValidator(value->!"invalid".equals(value), "Value is invalid")
    	         .bind(AtomicReference::get, AtomicReference::set);
    	add(rbg, new TextField());


auto clicker PLEASE

we have a power option to not turn off display, but what about an auto clicker or an activity simulator AND the ability to let the computer sleep (to save energy)?
Scenario when this would be used?
when you don't have much to do at work but want to simulate busy-ness
Supporting information
No response

no plans to fake user intent.  The goal of Awake is to help aid in keeping long running processes with the ability to execute.


Well-Documented OSH project of design reuse guideline

Chapter 1: Introduction
Motivation and goal for starting a project:
https://github.com/BCN3D/BCN3D-Moveo

Capter 3: Design
Functional model: block diagram of the flow and functions of the hardware and firmware.
https://github.com/fossasia/pslab-hardware#block-diagram

Chapter 4: Manufacturing
Manufacturing instructions:
https://github.com/nasa-jpl/open-source-rover/tree/master/mechanical/body_assembly#3-machiningfabrication
https://wiki.satnogs.org/SatNOGS_Rotator_v3#Build_Sequence

Chapter 5: Assembly
Assembly instructions
https://github.com/nasa-jpl/open-source-rover/tree/master/mechanical/body_assembly
https://wiki.satnogs.org/SatNOGS_Rotator_v3#Assembly
https://ohai.satnogs.org/project/satnogs-rotator-v3-mechanical-assembly/hardware/

Chapter 6: Use
User guide:
https://docs.pslab.io/tutorials/oscilloscope.html#tutorials-oscilloscope--page-root

Other well-documented OSH projects:
https://echopen.gitbooks.io/echopen_prototyping/content/
https://github.com/AmboVent-1690-108/AmboVent
https://cloud.opensourceecology.de/s/Hc84KLxz3y2AnDA?path=%2F
https://docs.px4.io/master/en/

from amer:
Link of our guideline on GitHub
https://github.com/OPEN-NEXT/wp2.3_Guideline-for-documentation-of-OSH-design-reuse/tree/main/Documentation
Link of metadata on GitHub
https://github.com/OPEN-NEXT/wp2.3_Guideline-for-documentation-of-OSH-design-reuse/tree/main/Metadata

Open points from above linked projects -

E-vent
https://e-vent.mit.edu/resources/downloads/
Published on MIT.edu, any other information about the repo of this project? or shall i consider the same platform(MIT) for manifest file?

MPS Open source ventilator
https://www.monolithicpower.com/en/mps-open-source-ventilator
Is the above project same as : https://github.com/ermtl/Open-Source-Ventilator ?
If no, any link for the repo?
Any suggestions or info on this matter are welcomed :)
Thanks

E-vent
https://e-vent.mit.edu/resources/downloads/
Published on MIT.edu, any other information about the repo of this project? or shall i consider the same platform(MIT) for manifest file?

All information about this project is available on the MIT emergency ventilator platform (https://emergency-vent.mit.edu/), and you can find the manifest file on this platform

MPS Open source ventilator
https://www.monolithicpower.com/en/mps-open-source-ventilator
Is the above project same as : https://github.com/ermtl/Open-Source-Ventilator ?
If no, any link for the repo?

They are two different types of open source ventilator projects, they are not the same.
The links for the repository:
https://www.monolithicpower.com/mps-open-source-ventilator-design-files.html
https://www.monolithicpower.com/mps-open-source-ventilator-design-files.html
Also, you can find the project description in the link below
https://www.monolithicpower.com/en/mps-open-source-ventilator

Hi @amerezoji1362 , thanks for the information :)


[Feature] Index Lifecycle Management

Please add in v8 client API features that were previously in v7 in Elasticsearch.Net.Specification.IndexLifecycleManagementApi namespace.
https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html

@seruss Thanks for raising this to highlight your need for this area of the API. Are there any specific endpoints which would be most useful for your use case(s)?

@stevejgordon yes, the most important for me is PUT on /_ilm/policy/{policy_id}

Blocked until the spec is updated to represent the possible externally tagged actions.


Feature: optional repository field

I started from the thought that if someone wanted to contribute to a package, there was no link to the project repository.
And putting that same link on the README doesn't make sense.
So I think you have to put an optional repository field, which you can configure in the egg.json file.
{
  "name": "remove-forever",
  "description": "Data erasure solution for files on deno 🦕",
  "stable": true,
  "version": "0.1.12",
  "repository": "https://github.com/oganexon/deno-remove-forever",
  "files": [
    "README.md",
    "images/*",
    "mod.ts",
    "cli.ts",
    "lib/*"
  ]
}

It would then be visible next to the author field on the package page.

I insist on the fact that I did not go very far in the total functioning of the project and that I could not test this functionality. (And my implementation in the Vue component is probably incorrectly done. I don't know this framework.)
It probably doesn't work, someone needs to review it.

Thanks for adding a binding that href. I had looked over that.

CLI and web LGTM, but API will need some more changes to make this work, will look into this tomorrow.

#92 has the required API-side changes to make this work. Once we merge that, we can merge the CLI and web code from this one too.

@justablob already implemented these changes in his most recent PR, so I'm closing this and re-adding your addition to the frontend in a separate PR.


Link to multi-app run quickstarts

Description
Add links to the quickstarts from:

Service invo quickstart doc
Multi-app run overview

Issue reference
PR will close: #3169

@msfussell

@hhunter-ms - Now I look at this, again, we should have a step #5 in the Service Invocation that says, do the above with Multi-App run, instead of starting each one. Do this as an alternative to just pointing to the Github repo.

LGTM - Again


Ambiguity between count of Failed vs Queued Datums

JobInfos have three fields with datum counts: data_processed, data_skipped, and data_total.
data_total is a static count of all datums to be processed; the other two are live-updated as datums are handled by workers. The difference between data_total and (data_processed + data_skipped) is generally the number of datums still queued to be processed, but can also include a number of failed datums. It doesn't seem to be possible to distinguish between these at the moment.

Currently a job immediately fails once a datum has failed, so even if we had a data_failed count it would never be more than 1, which would not be helpful.  In other words, if a job is running, there are no failed datums.

I believe this assumption that a job can only have a single failed datum is no longer valid -- my understanding is that as of 1.7 a job will try all datums (was just talking with @sjezewski about this)

It's still the case that we fail fast after a single datum fails, there isn't a guarantee that only one datum can fail to process, since things are running in parallel, but after a job completes there's always a single datum that gets reported as the reason for the failure in the Reason field. I don't think there's going to be a useful way to expose datum failures in the progress section, which is already fairly complicated by a number of different datum states. The way datum failures get exposed in the Reason seems like it's a lot more useful and gives people a good idea what's going on.


Possible bug with 'with_distance = True' in DynamicVFE

https://github.com/open-mmlab/mmdetection3d/blob/d0d3d944ee7874e53eeea4ce9801a8e2c289e6ea/mmdet3d/models/voxel_encoders/voxel_encoder.py#L334
Should it be in_channels += 1?

Yes I guess it's a typo. Have you encountered any bugs because of it? If you have checked the results, could you please create a PR to fix it?


Requirements for a valid GIG (and for a valid gigl encoding)

I'm not sure we have written down the GIG validity requirements anywhere. Here's my suggestion:
Definition
A gig is a multidigraph with nodes indexed from 0..n and edges providing links between those node IDs. What makes this a GIG in particular, rather than a general graph, is that the edges are annotated with one or more intervals consisting of a (childLeft, childRight, childChromosome, parentLeft, parentRight, parentChromosome) tuple and the nodes each have a single (floating point) time value, with higher values indicating older times.
For efficiency the gigl library denormalises edges and intervals, combining them into a single iedges table, each row of which is like this:

optional

child_left
child_right
parent_left
parent_right
childID
parentID
child_chrom
parent_chrom
edgeID

Base Requirements for any GIG (with biological justification)

All values in an iedge row are assumed to be integers. The first 8 columns are nonnegative integers.
The edgeID can be set to  -1, which is the default if it is not specified. Among all the rows with a -1 edge value, each separate combination of (childID, parentID) is treated as belonging to a separate single edge.  Note that we currently do not use the edge IDs, but they could be useful to indicate different transmission paths e.g. in "recombination diamonds".
We must have a finite but nonzero abs(child_right - child_left) == abs(parent_right - parent_left) (meaning that we can't magic up genetic material from nowhere)
iedges for a given childID+child_chrom cannot have overlapping (child_left, child_right) intervals (meaning that a single base pair can only have one parent)
the parentID node time must be strictly older than the childID node time (cannot have time-travel: this is what makes the GIG a directed acyclic graph). Note that this requires us to map the childID and parentID to a node in the node table.

Efficiency requirements (needed by a gigl GIG)
In the gigl library, we enforce the following requirements, for efficiency:

child_left < child_right (but we can have parent_left > parent_right to indicate an inversion)
Iedge row ordering requirements (together these impose a canonical order on the iedges, so that they can always be sorted into a strict order)

Iedge rows with the same childID are adjacent in the table
Within a set of rows with the same child ID, rows are ordered first by chromosome ID (ascending), then by child_left (ascending)
Between sets of rows with a different child ID, rows are ordered first by child node time (descending) then by childID (ascending)

Other
Once we implement mutations, there may be other requirements. Meanwhile, here is how I am currently thinking of coding up the requirements above as flags:
# GIG DEFINITIONAL REQUIREMENTS

IEDGES_DATA_ARE_INTEGERS = 1 << 0  # noqa: F401

# Most important: valid finite nonzero intervals with parent span == child span
IEDGES_VALID_INTERVALS = 1 << 1  # noqa: F401

# Second most important: each chromosome position in a child has only one edge above it
IEDGES_FOR_CHILD_NONOVERLAPPING = 1 << 2  # noqa: F401

# Ensure the graph is acyclic (requires knowledge of the times in the nodes table)
# Also useful for guaranteeing that there are nodes with the parent and child IDs
IEDGES_PARENT_OLDER_THAN_CHILD = 1 << 3  # noqa: F401

# Iedges with the same edge_ID must have the same combination of parentID / childID
# (note the inverse may not be true: iedges with the same parentID / childID can have
# different edge_IDs)
IEDGES_SAME_PARENT_CHILD_FOR_EDGE = 1 << 4  # noqa: F401

# IEDGE EFFICIENCY REQUIREMENTS (e.g. to define a canonical iedge order)

# keep child_left < child_right (but inversions will have parent_left > parent_right)
IEDGES_CHILD_INTERVAL_POSITIVE = 1 << 5  # noqa: F401

# all iedges with the same child ID are adjacent in the table
IEDGES_FOR_CHILD_ADJACENT = 1 << 6  # noqa: F401

# within a set of iedges for the same child, iedges are ordered first
# by chromosome number
IEDGES_FOR_CHILD_PRIMARY_ORDER_CHR_ASC = 1 << 7  # noqa: F401

# within a set of iedges for the same child & chromosome, iedges are ordered by left
# position (if IEDGES_FOR_CHILD_NONOVERLAPPING and IEDGES_CHILD_INTERVAL_POSITIVE are
# set, then this means that iedges must also be ordered by right position)
IEDGES_FOR_CHILD_SECONDARY_ORDER_LEFT_ASC = 1 << 8  # noqa: F401

# the adjacent rows for a child are ordered in descending order of child node time
# (requires knowledge of the times in the nodes table)
IEDGES_PRIMARY_ORDER_CHILD_TIME_DESC = 1 << 9  # noqa: F401

# ties (child nodes at the same time) are broken by putting the lowest child ID first
# (note: probably not very important, but creates a canonical ordering; it also implies
# IEDGES_FOR_CHILD_ADJACENT must be set)
IEDGES_SECONDARY_ORDER_CHILD_ID_ASC = 1 << 10  # noqa: F401

# These are the requierments that require us to know the node times
IEDGES_NODE_TIME_REQUIREMENTS = IEDGES_PARENT_OLDER_THAN_CHILD | IEDGES_PRIMARY_ORDER_CHILD_TIME_DESC

VALID_GIG = (
    IEDGES_DATA_ARE_INTEGERS | IEDGES_VALID_INTERVALS | IEDGES_FOR_CHILD_NONOVERLAPPING | IEDGES_PARENT_OLDER_THAN_CHILD | IEDGES_CHILD_INTERVAL_POSITIVE | IEDGES_FOR_CHILD_ADJACENT | IEDGES_FOR_CHILD_PRIMARY_ORDER_CHR_ASC | IEDGES_FOR_CHILD_SECONDARY_ORDER_LEFT_ASC | IEDGES_PRIMARY_ORDER_CHILD_TIME_DESC | IEDGES_SECONDARY_ORDER_CHILD_ID_ASC
)

That looks good to me! I think there might be additional ways in which the data structure could break in handcrafted examples, but they'd be more tricky to validate. You haven't added any checks for consistency between iedges going into a given node and iedges going out of that node. For example, max(parent_right) for iedges going out can't be greater than max(child_right) for iedges going in, since otherwise you could have a chunk of genome without ancestry. I don't think it's possible to generate such a case with simulation though, so it's probably not worth worrying about.

Ah, yes. But I think we do allow chunks without ancestry in tskit, which represent "missing data". Perhaps we should allow that and document it?

We should add a test that randomly re-orders a set of iedges, then sorts them, to check that tables.sort() always results in the same order.
Ideally, this would be a cause where we have different chromosomes (see #103 to address first)

This is all now encoded in the ValidFlags, and also in the docstring for tables.graph(), so I'm closing


Add support for quarter of year

Need to support for getting begging of current quarter and end of current quarter

No problem, i can add tomorrow.

I added this functionality to v1.0.4.


Fix bug "MC-194811"?

This is a really annoying bug that has to do with world gen so I thought I'd ask, is it possible for you to fix this bug: MC-194811 ? Am not sure what you will need to do to fix this but if you could take a look i'd appreciate it. Cheers!

I'd heard of this before, however I was under the impression it was already fixed by Forge - but that may not be the case (?). Or it may just be sitting in a PR getting stale.
Fabric API had fixed this a while ago although.

This has now been fixed in Forge, as of 1.16.4-35.0.22, and as such is not needed by Chocolate.


Stuck on processing mobi with large files that need to be chunked

When I input a large .cbz file (1.1 gb) to convert to MOBI/AZW3, KCC hangs indefinitely during the "Processing MOBI" stage. When I try running the source code, the console output displays a "List index out of range" error when the hanging starts. This error doesn't appear when converting the same file to EPUB.
A workaround I have found is: rename the .cbz extension to .zip->unzipping the resulting file->input the resulting unzipped directory after clicking "Add directory" in KCC.
This appears to be the same error in this issue, but it says it's supposedly fixed: https://github.com/ciromattia/kcc/issues/582

Tested with 6.2.2 and 6.3.0, still hangs for both. Here's the file structure:

@alvinchenn can you coy paste the full error when you run from source?
Can you show me what's inside the cbz after unzip

qt.gui.imageio: libpng warning: iCCP: known incorrect sRGB profile
Preparing source images...
Checking images...
Processing images...
Creating EPUB file...
Creating EPUB file...
Error calling Python override of QThread::run(): Traceback (most recent call last):
  File "/Users/alvinchen/Downloads/kcc-6.2.2/kindlecomicconverter/KCC_gui.py", line 366, in run
    item, comic2ebook.options.covers[outputPath.index(item)][1]))
          ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range


[REQUEST] Render templates variables in any page

Hi,
Currently (version 4.12) the only page in with the template variables are rendered is in the Home page.
I would like to be able to inject each variable content in any page.

Hi i've done a code review and just plugin.summary and plugins.goals seams missing into children
I've release version 4.13-SNAPSHOT ... could you test it and let me know ?
Thanks in advance

Indeed, I have seen that the code seems to do it for every variable but plugins' .
I wanted to reproduce the problem in a unit test but I couldn't.

Could you be more precise ... as you say the code propagates variables  so: what are the variables not propagated ?

I was speaking about the code before your fix. I had noticed plugin.goals only.

Ok
So I'll consider issue solved
Thank again for your actively contribution

No problem :+1:

fix released in 4.13


Fix elastic capcity link

Fix a link going to an old version of the site by making it a relative link.

Found a few other links with the same problem, so added them into this PR.


feat: goblin town

Introduces Goblin Town.
Assorted points about the implementation:

When a Realm is settled, immediately a new Goblin Town (GT) is spawned - a goblin welcome party. It's a very small GT, with only a single sad goblin. The intention here is to get the players to know this aspect of the game. In the current implementation, one could unstake & restake a Realm to remove a GT, because the creation of the welcome party overwrites whatever GT data there is. I think it's an acceptable loophole for now.
The calculate_strength func in goblintown/library.cairo depends on the fact that the resources in RealmData are in ascending order (particularly that the most precious one is in the slot of resource_number value). It wasn't the case before, but @ponderingdemocritus fixed it 🙏
Spawning logic - time: after a GT is defeated, a new one is spawned in a N hours, where N is a random number in the [24, 48] interval
Spawning logic - strength: each GT has a "strength" attribute, which just signifies how many goblins there are. This number is primarily based on the rarest resource a Realm has - this is a constant number (distribution in the following table). On top of that, a random number of goblins [0, 4] is added to the party at spawn time.

Wood, Stone, Coal -> 1
Copper, Obsidian, Silver -> 2
Ironwood, ColdIron, Gold -> 3
Hartwood, Diamonds, Sapphire -> 4
Ruby, DeepCrystal, Ignium -> 5
EtherealSilica, TrueIce -> 6
TwilightQuartz, AlchemicalSilver -> 7
Adamantine, Mithral -> 8
Dragonhide -> 9

On an unsuccessful attack, goblins stay at the same strength - you either slay the GT fully or not at all.
Only a Realm's attacking army can be used to slay the goblins.
I'm reusing the combat events (CombatStart_3, CombatOutcome_3, CombatStep_3) - as these take a defending realm ID, I'm passing Uint256(0, 0) since it's the GT that's the "defending realm". Probably relevant to @tenoxious
A goblin is represented as a new Troop type, with the following stats:

Type: Melee
Tier: 1
Building: 0 # not relevant
Agility: 2
Attack: 3
Armor: 1
Vitality: 30
Wisdom: 1

Note that these stats (goblin troop specs, goblins per rarest resource, etc.) are totally made up by me since they are not specified in the Masterscroll. Someone more knowledgable (usually goes by the name Fomenatdor 😇 ) should probably fix these 🙏
Some other implementation details:

Combat and Settling modules must be approved in the GoblinTown modules (@ponderingdemocritus I'm not sure how to do this)
After a successful attack on a Goblin Town (aka Goblindown), the Realm owner should be given som $LORDS. This is currently set at 20 (again, made up by me). To do this, I've added a mint function directly to the LORDS ERC20 contract. It's currently unprotected 😱 I will fix it in a later PR, we need an ACL approach.

this looks great - mostly composed from combat module so i couldn't see any issues

@ponderingdemocritus just marked this as ready for review, please have another look - I've also updated the description, don't miss it

Unsettling a Realm will completely wipe any changes made in-game, effectively resetting the Realm to a clean state. So no need to worry about people unsettling Realms, there'll be no loophole.

The spawning strength being based on resource rarity is a great idea - works very well with lore - but it's very crude right now, it'd lead to heavy unbalances. The relative value of resources goes from 1 to 218, and the current grouping presents some clear distortions. Hartwood and Diamonds are in the same grouping, for instance, but one is twice as rare - and as valuable - as the other; putting those two together would create all kinds of market incentives and unwanted consequences. There are graver problems besides grouping, but you get the idea. The LORDS emission will be probably the biggest financial incentive in the game, balance here is essential.

Using a number based approach unfortunately doesn't work for the old combat or the new. If you have 3 units attacking a weak one, the 3 should always win. You could just build an army with 3 tier-1 units and easily clean out everything.  The strongest possible goblin army of 13 units, still could be easily defeated by a 15 unit complete army. If you just buff the stats of the unit to a point where one can actually be a threat, then 15 become unbeatable. The difficulty here must be dictated by unit strength, not numbers.

I like the idea of a goblin town always regenerating and needing to be felled in one battle, but maybe the way I can make this work will be increasing the total troops cost for the wealthier Realms - which would mean several attacks needed for success. So this mechanic might need to go.

Like the idea of only attacking army being able to be used against goblins. For the old combat I found we needed to give at least two armies to be used (attack and defence), but with the new combat having several attacking armies this idea fits better.

The number and periodicity of LORDS given is a question of tokenomics and it does not interfere with game balance (so far), so it's a discussion for more people to have, and not in the comment section of github.

In short, I'll have to design a new system for the goblin town combat. Since the towns won't be truly used in Alpha, though, I don't want to put that high in the list of priorities. Is it a problem for you if I put this in the list for next month?

Added emits on spawn. These emit the full squads so the indexer can just store them like it stores other squads.

Events! Good call, I forgot about them.

have actually merged this with alpha-tweaks. So going to close this as tweaks is up to date, and we will adjust this module soon.


[QA-1876] Terra UI test log createWorkspace and deleteWorkspace errors

https://broadworkbench.atlassian.net/browse/QA-1876
Error like this is not useful for troubleshooting failure.
Tests Summary
----------------------------------------------
Test: preview-drs-uri
Status: failed
Failure message: Error: Failed to create workspace: terra-ui-test-workspace-1e538e53-e2f1-4780-ac2f-69131ea3232a with billing project saturn-integration-test-dev
    at /mnt/ramdisk/integration-tests/utils/integration-helpers.js:39:11
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at /mnt/ramdisk/integration-tests/utils/integration-helpers.js:19:12
    at /mnt/ramdisk/integration-tests/utils/integration-helpers.js:57:25
    at /mnt/ramdisk/integration-tests/utils/integration-utils.js:317:12
    at /mnt/ramdisk/integration-tests/utils/integration-utils.js:350:10

Fix makeWorkspace and deleteWorkspace function to log response body.
Example of test log that shows why when makeWorkspace has failed:
Tests Summary
----------------------------------------------
Test: analysis-context-bar
Status: failed
Failure message: Error: Evaluation failed: {"causes":[],"message":"Billing Project terra-dev-01867dda does not exist","source":"rawls","stackTrace":[],"statusCode":400}
    at ExecutionContext._evaluateInternal (/Users/bweng/projects/terra-ui/.yarn/unplugged/puppeteer-npm-13.5.1-231e586c7a/node_modules/puppeteer/src/common/ExecutionContext.ts:273:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at ExecutionContext.evaluate (/Users/bweng/projects/terra-ui/.yarn/unplugged/puppeteer-npm-13.5.1-231e586c7a/node_modules/puppeteer/src/common/ExecutionContext.ts:140:12)
    at /Users/bweng/projects/terra-ui/integration-tests/utils/integration-helpers.js:35:22
    at /Users/bweng/projects/terra-ui/integration-tests/utils/integration-helpers.js:19:12
    at /Users/bweng/projects/terra-ui/integration-tests/utils/integration-helpers.js:75:25
    at /Users/bweng/projects/terra-ui/integration-tests/utils/integration-helpers.js:152:5
    at /Users/bweng/projects/terra-ui/integration-tests/utils/integration-helpers.js:201:3
    at /Users/bweng/projects/terra-ui/integration-tests/utils/integration-helpers.js:117:5
    at /Users/bweng/projects/terra-ui/integration-tests/utils/integration-utils.js:313:12

Example of test log that shows response body when makeWorkspace and deleteWorkspace have succeeded:

@petesantos PTAL (two thumbs for PR rule is annoying)


separate ingress services from kubevirt component manifests

In an effort to make our development KubeVirt component manifests as generic as possible, we need to separate our vagrant ingress services containing references to externalIPs from the kubevirt components.
Put all ingress services related to vagrant in vagrant-services.yaml. This will move us in the direction of being able to use the kubevirt component manifests in environments outside of vagrant.

Put all ingress services related to vagrant in vagrant-services.yaml. This will move us in the direction of being able to use the kubevirt component manifests in environments outside of vagrant.

I know it is nitpicking, but also without that separation it is possible to deploy these manifests outside of vagrant. One can either adjust externalIPs to its needs and run make generate, or simply plug in our services via any other way (e.g. ingress) and just use different public ports. But moving them into one file, to make it easier to skip them is fine.

Done in #560


Implement ChainSpec and HardForks

Overview
We must implement a ChainSpec and HardForks for scroll and also scroll sepolia testnet.
Hardfork
The Hardfork is used to determine the block number and timestamp at which features / functionality is changed. An example of a Hardfok implementation for Optimism can be found here. It should be noted that there is an expectation for hardforks to be mixed with ethereum hardforks as stated here:
https://github.com/scroll-tech/reth/blob/9c9d82c6bd1199ba0392a76a570001f9c9fa021e/crates/optimism/hardforks/src/hardfork.rs#L17-L36
We should review the hardforks introduce in scrolls fork of revm which are feature gated in the link provided. We should then implement a pattern similar to optimism by creating a crate to define these in reth for scroll. These will then be subsequently integrated with the rvm hardfork type as seen below in the optimism example (this is outside of the scope of this issue and should be handled in https://github.com/scroll-tech/reth/issues/5):
https://github.com/scroll-tech/reth/blob/9c9d82c6bd1199ba0392a76a570001f9c9fa021e/crates/optimism/evm/src/config.rs#L5-L30
ChainSpec
The ChainSpec defines the core primitives of the chain such as the chain id, state genesis data, hardforks and other properties relating to the chain. A comprehensive view of the ChainSpec can be seen by observing the data structure:
https://github.com/scroll-tech/reth/blob/9c9d82c6bd1199ba0392a76a570001f9c9fa021e/crates/chainspec/src/spec.rs#L171-L216
We should follow a similar pattern as Optimism and implement a crate for scrolls ChainSpec associated types. The Optimism example can be found here. We should implement a spec for both scroll mainnet and scroll sepolia.

Should we add the fee_vault_address as part of the ScrollChainSpec?
This would follow the pattern used in l2geth and allow us to introduce ScrollEvmConfig and implement ConfigureEvmEnv, where we can set the coinbase for the block to the vault address.

I think we need to add.

Closed by #56.


Double initialisation of child state controller

Hi there!
I configured the two child states in the router passing the name of the controller. When the view loads on the page with tabs the controller is initialised twice. Did you also encounter this behaviour?
Thanks

Can you please create a plunkr that reproduces this?

false alarm, it's because of the ui-view being present multiple times (on each tab content)


Add subtasks feature.

Add a feature that allows the user to have subtasks.

Just realized, it would be an overkill.


is it possible to use executeJs on frames

I have an executeJs function that does various things, none of which involve changing the dom, an example of which is to scrape dynamically created style sheets.
I wish to do this with iframes of the main window, possibly 2 levels deep, even if the iframe is a different origin than the main window.  Thus it is not possible in general to simply call executeJs() on the main window and iterate the window.frames pseudo-array to do this.
So I tried the following code, and got a runtime exception telling me that frame.use() is not a function.
import { Agent } from 'secret-agent';
import ExecuteJsPlugin from '@secret-agent/execute-js-plugin';

export async function scrapeUrl(requestUrl: string): Promise<string[]> {

  const userAgent =
    'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_16_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.165 Safari/537.36';
  const agent = new Agent({
    userAgent,
  });

  await agent.goto(requestUrl);
  await agent.waitForPaintingStable();

  const frames = await agent.frameEnvironments;
  const result: string[] = [];

  // NOTE: the first frame is the main window
  for (let i = 0; i < frames.length; i++) {
    const frame = frames[i];
    // @ts-ignore
    frame.use(ExecuteJsPlugin);

    // @ts-ignore
    const html = await frames[i].executeJs(() => {
      // @ts-ignore
      const result = document.documentElement.outerHTML;
      return result;
    });
    result.push(html);
  }

  await agent.close();
  return result;
}

Is there a way to accomplish this currently?  NOTE: if I just needed the outerHTML, I'm sure it could be done another way, but I am just trying to see if I can inject javascript into any window available from the main document's frames.

The ExecuteJs plug-in is really intended as an example of how to create a plug-in. There are two options that I can think of:

write a plug-in that accesses the underlying frames of the page that gets passed to the callback and use the evaluate function on those frames. As an added bonus, you can run the js in an isolated JavaScript context where your global variables can't be seen by the main page
Each frameenvironment you've accessed exposes a document that can run full awaited-dom functionality (asynchronous read only dom). Can you examine your style sheets with awaited dom features?

Your second point is something to look into.  Perhaps.  Your first point is really surprising.  Does the executeJs plugin provided by you guys allow me to see how to hide my global variables from the main page?  That wasn't clear to me with the executeJs method for the main page, because it felt like it simply emulated puppeteer's page.evaluate() function.

When we built plugins, we exposed some of the internals of SecretAgent that don't have any documentation yet. Typescript should yield some basic type information, but it's not going to have good descriptions for what parameters mean. If you look in the CorePlugin in executeJs, you'll see a puppetPage that gets passed in. It comes with an "evaluate" that simply runs a Runtime.evaluate against the main frame of the page (https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-evaluate).
Also on that object is an array of "frames". Those frames have a direct evaluate function that can be run. This is the signature:
evaluate<T>(
    expression: string,
    isolateFromWebPageEnvironment?: boolean,
    options?: { shouldAwaitExpression?: boolean; retriesWaitingForLoad?: number },
  ): Promise<T>

The second parameter is how to "isolate" from the main web page environment. As some background to "what" this is - Chromium was adapted a while back to provided isolated javascript environments to various frames based on sandbox type settings. They extended this to Chrome extension developers to be able to add variables and globals to their own environment without impacting the browser page (eg, injecting a different version of jQuery globally).
Secret Agent keeps track of it's own "isolated" environment where all awaited dom activities and page event tracking occurs. This keeps it shielded from the main webpage and any attempts to look for the use of querySelectors and other similar calls (ie, page proxies the querySelector and waits for calls they don't recognize).
Hopefully that helps. In regards to figuring out "how" to use the different parts of "puppet", I would use Typescript (or look at the definition files), and for now, look at code snippets. We'll hopefully get some documentation up shortly that will make the rest easier.

Concerning this "isolated" environment that devtools offers, am I correct in understanding this to be a way to call various window and document built-in functions without worrying about whether the webpage has already "monkey-patched" that method to intercept all its calls?

It's a possibility, but you'd be bypassing a large portion of what is already built-in to SecretAgent to do so. This is the built-in way: await agent.document.documentElement.outerHTML...
All of the abilities to replay sessions and see which elements are actually being picked up, and the ability to create reliable scripts are far less powerful when you skip out on using the built-in stuff.
Are you finding that AwaitedDom (https://secretagent.dev/docs/basic-interfaces/awaited-dom), and the built-in Document (https://secretagent.dev/docs/basic-interfaces/agent#document) aren't providing you with something you need?

The thing I am doing is heuristically hiding (display none) div-based "popups" with fixed positioning, capturing the dom, plus all the dynamic sheets, capturing the screenshot, and then restoring the fixed positioned popus.  Also, I am inserting numbering attributes of my own before capturing the dom, and then removing that too.

So what I am understanding (and confused about), is that there are two plugins of interest in the execute-js package, ExecuteJsCorePlugin and ExecuteJsClientPlugin, and I need to model my plugin after one of these, but which one? It must be ExecuteJsCorePlugin because that is the one that has a puppetPage involved, but I don't see how this is the one that gets selected by the following import:
import ExecuteJsPlugin from '@secret-agent/execute-js-plugin';

... based on studying index.js in the execute-js package.  So I am a little confused about how the use() statement works.
However, assuming that I just write a plugin with the same signature ExecuteJsCorePlugin, and that my implementation of "onClientCommand" gets the puppetPage, when I call agent.use(MyPlugin), then I seems like what I am doing different than  is exposing the ability to call evaluate on the frames of the puppetPage argument, and also passing true as the second argument to evaluate.
But given that I am passing the class itself to agent.use(), and not an instance of the class, how do I expose my function for the main page, and my function for the evaluating on the frames?

I guess what I am saying is that IClientPlugin seems to be central to the exposing of the onTab and onClient functions that allow the patching of the tab and agent with a function that ends up forwarding to the CorePlugin and its puppetPage.
But this plugin scaffolding seems to be unique to IPuppetPage and I see nothing of the sort for IPuppetFrame.
Am I missing something?

Sorry, I meant to write back to your first post, but I got a bit tangled reading it.
SecretAgent is built in a client/server way (Core is server, Client is ...client.. ha). You're overriding two sides: 1) enable functionality on the server (where puppetPages and frames live), and 2) add some ability to trigger that functionality in your Client (ie, client Hero/Tab/FrameEnvironment) api.
When you add a client side api, it will call through to the backend api into your onClientCommand callback. That callback gets a puppetPage, from which you can access the "frames" and get to the respective subframes.
What you're trying to do is definitely pretty advanced. Are you looking through the monorepo, or the node_modules code? I think you're going to need to use typescript and poke around the monorepo to pull this off.

It appears that central to this plugin approach is the function argument 'sendToCore'.  I was hoping I could actually return the puppetPage in the method that sendToCore invokes.  But is it true the sendToCore can only return serializable results?
I was trying to do this:
export class MyClientPlugin extends ClientPlugin {
  public onAgent(agent, sendToCore: ISendToCoreFn): void {
    agent.getMyPuppetPage = (fn, ...args) => {
      return this.getMyPuppetPage(fn, sendToCore, args);
    };
  }

  public onTab(tab, sendToCore: ISendToCoreFn): void {
    tab.getMyPuppetPage = (fn, ...args) => {
      return this.getMyPuppetPage(fn, sendToCore, args);
    };
  }

  private getMyPuppetPage(fn, sendToCore, args): Promise<any> {
    return sendToCore(myPluginId, '', '', args);
  }
}

export class MyCorePlugin extends CorePlugin {

  public async onClientCommand(
    { puppetPage }: IOnClientCommandMeta,
    fnName: string,
    serializedFn: string,
  ): Promise<any> {
    return puppetPage;
  }
}

and was getting undefined for the result of getMyPuppetPage()

@andynuss Yes, this is correct. SecretAgent is built in a client/server way because it's expected that in most cases you'll run more than one server. Plugins are trying to give you a way to add client functionality as well as server

I think I'm having another problem.  Clearly the plugin allows me to use sendToCore to effectively call puppetPage.evaluate() or as you said earlier, puppetFrame.evaluate().
But I was wondering if I could have multiple functions, including some that get info such as the number of iframes for the puppetPage or various stringifiable attributes of all the frames.
It seems that the call signature of sendToCore (which is the only way I see of getting access to the puppetPage on the remote side) forces me to use some kind of serializedFn that the secret-agent code understands.
This seems to explain why my code above returned an undefined result.  Do you understand what I am wanting to do?

I'm not sure I'm understanding fully, but you can have as many functions as you want... sendToCore takes any arbirtary arguments (as long as they're serializable). So you could pass through a second argument that's your "action" for the remote core to take: eg, sendToCore(myPluginId, 'getFrameMetadata') and then in Core, just route to the correct function using that parameter
export class MyCorePlugin extends CorePlugin {
  public async onClientCommand(
    { puppetPage }: IOnClientCommandMeta,
    action: string, ... whateverElse: any[],
  ): Promise<any> {
   if (action === 'getFrameMetadata') return this.getFrameMetdata();
    return puppetPage;
  }

  private getFrameMetadata() {
   ....
 }
}

Regarding the "serializedFn" -- that's literally a function that will be called in the browser page. It doesn't have any SecretAgent knowledge.

Maybe you could show me how I would write a simple function that takes a variable number of args, and returns an array consisting of those args, using the plugin architecture and sendToCore?  That would help me see what I am missing.  I did see how the "action" arg could be used to call multiple functions.

i.e. a simple echoing function

Is this helpful?
  private echo(echo1: string, echo2: number, ...args:any[]): Promise<any> {
    const echoed = await sendToCore(myPluginId, echo1, echo2 ...args);
    console.log(echoed); // echo1 string, echo2 number, ... rest
    return echoed;
  }
}

export class MyCorePlugin extends CorePlugin {
  public async onClientCommand(
    { puppetPage }: IOnClientCommandMeta,
   echo1: string,
   echo2: number,
   ...args: any[]
  ): Promise<any> {
    return [echo1, echo2, ...args]
  }
}

Yes! I hope I can get it to work, or else I am doing something really more stupid, such as with myPluginId

Still having some problem, probably not with the part you gave me:
import ClientPlugin from '@secret-agent/plugin-utils/lib/ClientPlugin';
import CorePlugin from '@secret-agent/plugin-utils/lib/CorePlugin';
import { ISendToCoreFn } from '@secret-agent/interfaces/IClientPlugin';
import { IOnClientCommandMeta } from '@secret-agent/interfaces/ICorePlugin';

const myPluginId = 'my-test-plugin';

export class MyClientPlugin extends ClientPlugin {

  public onAgent(agent, sendToCore: ISendToCoreFn): void {
    agent.echo = (echo1: string, echo2: number, ...args:any[]) => {
      return this.echo(sendToCore, echo1, echo2, args);
    };
  }

  public onTab(tab, sendToCore: ISendToCoreFn): void {
    tab.echo = (echo1: string, echo2: number, ...args:any[]) => {
      return this.echo(sendToCore, echo1, echo2, args);
    };
  }

  private async echo(sendToCore: ISendToCoreFn, echo1: string, echo2: number, ...args:any[]): Promise<any> {
    const echoed = await sendToCore(myPluginId, echo1, echo2, ...args);
    console.log('sendToCore result', echoed);
    return echoed;
  }
}

export class MyCorePlugin extends CorePlugin {

  public async onClientCommand(
    { puppetPage }: IOnClientCommandMeta,
    echo1: string,
    echo2: number,
    ...args: any[]
  ): Promise<any> {
    return [echo1, echo2, ...args];
  }
}

... but with the test function that uses it after scraping a page:
import { Agent, ConnectionFactory, ConnectionToCore, LocationStatus } from 'secret-agent';
import { MyClientPlugin, MyCorePlugin } from './plugin';

const myplugins = { MyClientPlugin, MyCorePlugin };

const ua = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_16_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.165 Safari/537.36';

let sharedConnection: ConnectionToCore = null;

function getConnection (): ConnectionToCore {
  if (sharedConnection !== null) return sharedConnection;
  sharedConnection = ConnectionFactory.createConnection({
    maxConcurrency: 4,
  });
  return sharedConnection;
}

export async function testUrl(requestUrl: string, imageName: string): Promise<void> {
  const myagent = new Agent({
    userAgent: ua,
    viewport: {
      screenHeight: 768,
      screenWidth: 1024,
      height: 768,
      width: 1024,
    },
    connectionToCore: getConnection(),
  });

  try {
    myagent.use(myplugins);
    await myagent.goto(requestUrl);
    await myagent.waitForPaintingStable();
    await myagent.activeTab.waitForLoad(LocationStatus.DomContentLoaded);

    // @ts-ignore
    const echoargs = await myagent.echo('a', 1, 'b', 2);
    console.log('echoargs', echoargs);

  } finally {
    try {
      await myagent.close();
    } catch (e) {
      console.log('unexpected error closing new Agent', e);
    }
  }
}

these are my log lines:
sendToCore result undefined
echoargs undefined

I think it might be because you're not actually assigning the ID to the plugins. So it might not know how to route it. @calebjclark, is that right?

NOTE: I was never really sure how to set up the pluginId.  My code above that is not working was my simple attempt, so please let me know what to do.

Try adding static readonly id = 'my-test-plugin' into Core/Client plugins

How would that help?  In my main test function, I do this:
import { MyClientPlugin, MyCorePlugin } from './plugin';

const myplugins = { MyClientPlugin, MyCorePlugin };
....
myagent.use(myplugins);

and I don't think a static readonly id would be part of the 'myplugins' object that I pass to the use() function.

Oh, I see what you meant.  One sec

@andynuss, it's required for SecretAgent to hook into the plugin. It's how we designed the plugin architecture.

I think I did what you asked, and still getting the same undefined result as before.  Here is my compiled javascript for plugin.js:
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MyCorePlugin = exports.MyClientPlugin = void 0;
const ClientPlugin_1 = __importDefault(require("@secret-agent/plugin-utils/lib/ClientPlugin"));
const CorePlugin_1 = __importDefault(require("@secret-agent/plugin-utils/lib/CorePlugin"));
class MyClientPlugin extends ClientPlugin_1.default {
    onAgent(agent, sendToCore) {
        agent.echo = (echo1, echo2, ...args) => {
            return this.echo(sendToCore, echo1, echo2, args);
        };
    }
    onTab(tab, sendToCore) {
        tab.echo = (echo1, echo2, ...args) => {
            return this.echo(sendToCore, echo1, echo2, args);
        };
    }
    async echo(sendToCore, echo1, echo2, ...args) {
        const echoed = await sendToCore(MyClientPlugin.id, echo1, echo2, ...args);
        console.log('sendToCore result', echoed);
        return echoed;
    }
}
exports.MyClientPlugin = MyClientPlugin;
MyClientPlugin.id = 'my-test-plugin';
class MyCorePlugin extends CorePlugin_1.default {
    async onClientCommand({ puppetPage }, echo1, echo2, ...args) {
        return [echo1, echo2, ...args];
    }
}
exports.MyCorePlugin = MyCorePlugin;
MyCorePlugin.id = 'my-test-plugin';

(I think I've given you all the pieces of the code that's not working for me.)

@andynuss, your undefined problem is being caused by two issues:

For security reasons, ClientPlugins must explicitly state what core plugins they depend on. Add a static coreDependencyIds array to your MyClientPlugin:

export class MyClientPlugin extends ClientPlugin {
  static id = 'my-test-plugin';
  static coreDependencyIds = ['my-test-plugin'];
  ...
}

Your MyCorePlugin cannot be passed as an object into agent.use. The reason is that the Client and Core sides of SecretAgent are actually running in separate NodeJs processes. The easiest approach in your situation is to just pass an absolute path. Change from this:

import { MyClientPlugin, MyCorePlugin } from './plugin';

const myplugins = { MyClientPlugin, MyCorePlugin };
....
myagent.use(myplugins);

to this:
import Path from 'path';
....
myagent.use(Path.resolve(__dirname, 'plugin'));

Let me know if that works.
Long story short, this entire flow is really confusing -- we're fixing this in our next big release.

I tried both parts of the solution, and it seems like this call:
myagent.use(Path.resolve(__dirname, 'plugin'));

... which did succeed, caused the following line:
await myagent.goto(requestUrl);

with this error:
testUrl failed: TypeError: coreTab.goto is not a function
at Tab.goto (/Users/andynuss/repos/stag-secret-agent/app/node_modules/client/lib/Tab.ts:161:36)

@andynuss, it's tough to know what's going on without seeing the full client script as well. Any chance you can send me your full script(s) -- both plugins + your client script?
Either temporarily add me to a github repo as a dev or email it to me (caleb@ulixee.org). I'm glad to investigate further.

will do

do you mind if I send the compiled js files, or would you rather have the 2 .ts files?

@andynuss please send them as Ts files.

@andynuss what version of secretagent is in your package.json?

"dependencies": {
  "ts-node": "^10.1.0",
  "secret-agent": "^1.5.5",
  "@secret-agent/execute-js-plugin": "^1.5.5",
  "@secret-agent/plugin-utils": "^1.5.5",
  "@secret-agent/interfaces": "^1.5.5"
},

Sorry for the delay. Think we figured out the part of the .goto blowing up

So, should I try it again with 1.5.10?

@andynuss yes, you should get past the previous client errors.

I am still getting the same problem last identified with the 'coreTab.goto is not a function'
using the same two files I gave you by email before -- plugin.ts and test.ts
what does this do?  Is it possible that my directory structure is different?
myagent.use(Path.resolve(__dirname, 'plugin'));
also, I am running my test.js/plugin/js pair in a different directory than where I have my plugin.ts and test.ts files located.
and, this is a biggie, I am invoking the main function in test.js from my own simple nodejs http service (server.js) that is in turn triggered by a remote (java) program sending an url to the service
But to test out my theory that it had something to do with using test.js from my server.js http listener, I added this to the
bottom of test.ts:
(async () => {
  await testUrl('https://www.whatsmyua.info', 'dummy');
})();

... and sure enough, doing 'node test.js' caused the same gotoTab error

This indicates to me that either my compiled test.js/plugin.js files are different in some critical way than yours,
or there is some kind of relative directory problem in the call to this:
myagent.use(Path.resolve(__dirname, 'plugin'));

I think you sent your files to Caleb. I haven't seen them.  I think you're having issues with Core spawning off into a new process. That said, it's very difficult to tell more about what's going on without more code or logs

The only thing I know to do is send my pair of *.ts files as well as my pair of *.js files and ask you to simply run 'test.js' with node.  Do you want me to send these files somewhere?

Sure - send them to me at blake at ulixee.org. If you have a session database for a failed run, that might help too - https://secretagent.dev/docs/advanced/session

I see that a fix has been merged.  Should my code "just work" if I use the latest version?

Take a look at the examples I checked in. Your code might need some tweaks: https://github.com/ulixee/secret-agent/blob/main/examples/plugin-echo-use.ts

I was doing this:
import ClientPlugin from '@secret-agent/plugin-utils/lib/ClientPlugin';
import CorePlugin from '@secret-agent/plugin-utils/lib/CorePlugin';

and your example does this:
import { ClientPlugin, CorePlugin } from '@secret-agent/plugin-utils';

I take it that these are not equivalent and I need to do it your way?

Both options are doing the same thing. I think we had forgotten to export from top level when you created your first example, but it was listed in the docs.

Well, does it surprise you that I simply did a 'yarn install' for 1.5.11 and my example (the one given to you guys) just worked untouched?

Thanks!


How to speedup goaccess?

So it takes my server 2 minutes to run goaccess. I check to see if it's bottle necked, it's not. CPU is like at 1% percent, disk IO is like nothing, but it's still super slow. Any thoughts?

how large are your access_log files?

a little over 1mb

ok, that is tiny. Have you tried to copy the log file to another machine and run goaccess again?
I assume it is some kind of infrastrucutre issue you are facing.

Takes 2.8 sec on my main pc

what I run:
goaccess /mnt/tb_hdd/logs/access_log_apache.txt --log-format=COMBINED --num-test=0 -o /mnt/hdd/http_share/log.html -a -e <IP_ADDRESS> --real-os

It's on a raspberry pi 4 overclocked to 2ghz, if that matters. But it shouldn't be bottlenecked.

Is there some way for me to see what the slowdown is?

you could clone the repo and try to debug it

wait... it seems if i use the official release, it finishes in 5 seconds. but if i compile it from source. it takes like 1 min

that's strange....

I'm going to try something....

Fixed it. I compiled goaccess with LTO before. Now that i disabled it, it works. weird

@allinurl Do you have any idea why goaccess would be slower when built with LTO?

Is this something common with compiling things with LTO?

To be honest, I don't have a concrete answer, like @LucaNerlich said, you may need to debug to find out where exactly is the bottleneck. I'm guessing somewhere it's over optimizing and performing additional cycles, maybe branch instruction throughput...
Can you post how you are building goaccess?

I just use the aur package goaccess-git, then i put some flags in makepkg.conf


Placement of bond or atom labels gets confused when atoms overlap

Reference Issue
Fixes #6559
What does this implement/fix? Explain your changes.
When 2 atoms had the same coordinates, some things like the placement of atom or bond notes or drawing wedges gave NaN due to division by the zero length.  This fix temporarily moves one of the atoms by 0.1, 0.1 in these circumstances so it doesn't occur.
Any other comments?
It was lucky that Greg's example had the offending atoms on a chiral centre, or the extra problem with drawing the wedges would have been missed.  Sometimes the sun shines on the righteous :-).

@DavidACosgrove I don't think you actually mean #6559 on this.


Examples fail on Ubuntu 18.04

The first to_ascii example from the readme fails on ubuntu 18, python 3.6.7. The expected output is ['tect'], but it just returns []

Hm. By some reason, т -> t mapping now not in the list of confusables.
curl ftp://ftp.unicode.org/Public/security/latest/confusables.txt | grep -F 'т'

They decided that this head of t is valuable. I'll update the docs.


Status of the project

I notice that there are still many people using this library. I am very thankful to everyone and feel some responsibility to explain the status of the project.
I no longer use this library by myself. In fact, I haven't used Resque for long time. For day to day job, I mainly use Elixir. I have to admit that I'm quite behind the scene.
I would say that this library is maintenance status and here are some notes to clarify.

I don't merge any pull requests for new feature
I will merge pull requests which are relatively small changes for bug/security fixes e.g. #45, #46
If Resque makes backward incompatible update, Resque-cleaner won't support the new version

You might ask for transferring the ownership but I am reluctant to do that in following reasons.

The library was written long time ago and the codebase doesn't follow some good practices discussed recently. If you are motivated to maintain the library, you should rewrite the library and publish as a brand new gem
It's MIT license. You are free to fork and publish as new gem as long as you publish it under the same permissions and add my name in copyright.

I hope you don't have a huge objection to the decision as Resque itself is not much active for years.
Thank you so much for your interest on this project.
And thank you especially to all people who have contributed! 🏅

I just forked and pushed https://rubygems.org/gems/resque-cleanerer 0.5.0 including some PRs on this repo.


Way to replace the Id function without changing generated code?

I have an issue with the Ids generated by odata2ts for the SAP CPI management OData API:
https://api.sap.com/api/IntegrationContent/path/get_IntegrationDesigntimeArtifacts_Id___Id___Version___Version___
The problem:
Resources require composite keys:
/IntegrationDesigntimeArtifacts(Id='{Id}',Version='{Version}'
// design time error since Version is not a key in metadata
const keycomplex = {
  Id: iFlowId,
  Version: "active",
};

// runtime/API error since string will get URL encoded and put in single quotes
const keysimple = `Id='${iFlowId}',Version='active'`;

const patchResult = await cpi
  .navToIntegrationDesigntimeArtifacts()
  .patch(keysimple, iFlowContent);

I realize the problem here is that the API is inconsistent: Some resources require keys which are not specified as keys in the metadata. I looked into replacing the Id function of the service to account for that, but have not found a way which doesn't require changing the generated code. Is there something I can do here?
I also realize this isn't exactly an issue with odata2ts - is there a development community or some place where I could raise questions like this?

Hi @manuelseeger,
first off, you're completely in the right place to address issues like that.
I try to take a look later.

Cool issue, thanks for bringing it up!
So it's an instance of an imperfect OData implementation: certain entities don't advertise all of their keys in the metadata.
I think that odata2ts should be able to cope with that reality of imperfect implementations.
You're going for an escape hatch: Providing the id path directly as string.
Instead I would suggest to offer a configuration which would render such an escape hatch unnecessary.
What do you think?
Solution Approach
Introduce config option entitiesByName (analogous to propertiesByName) to allow for further configuration of entities including their key spec.
{
  services: {
    cpi: {
      entitiesByName: [
        { name: "IntegrationDesigntimeArtifacts", keys: ["Id", "Version"] }
      ]
    }
  }
}

Released with<EMAIL_ADDRESS>@manuelseeger Could you try this out and confirm that it works and solves your problem?


Input is predicted by server and clients, but the correct/received input isn't used

It is safe to assume the server does a rollback, because it receives inputs from clients and rolls back to the tick of the received input up to the current state.
The below is the prediction/extrapolation the server does

and it seems input prediction/extrapolation is done not only by server but clients too.

This conflicts an old claim that there is no input prediction and the server just waits for inputs:

The weird thing is that once the correct input arrives, there seems to be no rollback from that input up to latest tick, so the correct input doesn't matter. The new input once it arrives, should trigger a rollback_tick and apply itself, but it doesn't. rollback_tick runs only once per frame. To prove this, put this code in brawler-controller.gd:
var debug_tick_directions: Dictionary = {} #<int, Vector3>

...

func _rollback_tick(delta, tick, is_fresh)
...
    # Place the below under the direction section
    if (multiplayer.is_server() && player_id != 1):
	if (debug_tick_directions.has(tick) == false):
		debug_tick_directions[tick] = direction
	else:
		print("Server: NetworkTime.tick (%s) Rollback Correction for Avatar %s at tick %s directions are: %v | %v" % [NetworkTime.tick, player_id, tick, direction, debug_tick_directions[tick]])

I cannot get the above to ever print with 3 players and 200ms delay.

The rollback only happens for the latest NetworkTime.tick because of this line, which applies to server and clients regardless of authority:
func _after_loop():
	_earliest_input = NetworkTime.tick

and on submit_input rpc function, it goes down for non-authorities (those who receive input RPC):
earliest_input = min(_earliest_input, tick_received)

Why focus on the variable _earliest_input? Because it is used to determine which tick a rollback starts

## Submit the resimulation start tick for the current loop.
##
## This is used to determine the resimulation range during each loop.
func notify_resimulation_start(tick: int):
	_resimulate_from_tick = min(_resimulate_from_tick, tick)

From my understanding, assuming all clients take exactly 3 ticks to send an input to the server:
At tick 100 (latest), the server has the clients' inputs of tick 97 and the input ticks of 98, 99, 100, are predictions/extrapolations using the same input of tick 97.
Let's say a client changes input at tick 99, and this input arrives to the server at tick 102. The server does replace its _inputs[] but it doesn't rollback to tick 99 up to 102. It rolls back to 101 (see after_loop function above) if not just proceeds with 102.
This would mean that the server, whenever it sends the state of any tick, e.g. tick 100, it isn't the true/final state, as it contains predicted/extrapolated inputs. And by extension, the server will rollback many ticks per frame because there is no input delay, which is not the case currently. Or have I missed a good part of the puzzle?

Related to all of the above "rollback doesn't work as expected" is that the state is RPC submitted at record_tick which happens within a rollback. So multiple states can be RPC submitted in a single tick if multiple rollbacks happen. This ofc doesn't currently happen, because rollback_tick doesn't run more than once per tick (as shown in the code example with debug_ticks_direction: Dictionary). So the state submission must be moved to after_loop in order to send only the latest state. Unless a new rollback is to also send corrected states? (I would suggest against this, as it kills the network because of bandwidth)

Being unable to debug further without spending days, I just want to understand how input prediction works in netfox. Forest brawl works, no one can deny that. But seeing how the bombs are directly injected into the state and are unaffected by rollback, and this general weirdness I discovered above, I feel something is fundamentally wrong, despite it working smoothly even at 200ms in a demo. I want to understand netfox fundamentally so as to expand it for physics or items.

P.S. I tried making a commit which closes this issue, by:

Updating the value of _earliest_input for input authority, to equal the latest NetworkTime.tick
Updating the value of _earliest_input for non-input authorities, to equal the latest _inputs[] index received.
Moved the state submission so it doesn't trigger per rollback tick, but after each rollback ends.
Debug print for _rollback_tick to confirm it triggers multiple times per rollback (it does)

But it bugs a lot, and idk why :cry:

tl;dr: There's (still) no input prediction in netfox, please read the code again

Ok so I want to help you on this, but the way this issue is written makes it really difficult for the following reasons:

Please specify the goal of the ticket explicitly

For a while, it's about input prediction, then how input is not handled well, then you end with wanting to understand rollback, but then change it to understanding netfox itself
Happy to help with either, but please pick one per ticket

Please include a direct problem statement

This is a long description of a hypothetical about how netfox might work
No actual bug is described ( current observed behavior vs. expected behavior )
Some quirkiness is discussed, but I'd prefer if you explicitly specified - preferably in a dedicated section - what's the expected vs. observed behavior, instead of me having to guesstimate which part you need help with

Please include code snippets as markdown code blocks

Screenshots are not as easy to read and navigate or even refer to as text
Some screenshots are also missing enough context so I have to figure out from memory which function are you referring to

Please use the original source code for examples

Discerning which part is original netfox code and which is temp / debug / custom gets even more disorienting with the above included
This got especially confusing on the first two screenshots, where I see that both refer to RollbackSynchronizer, but e.g. line 227 contains different text on both screenshots

Also please make sure to keep the above in mind in the future as well, when opening issues. Thanks!

This conflicts an old claim that there is no input prediction and the server just waits for inputs

Once again, there's no input prediction nor extrapolation. For your related example, please read the _can_simulate method in RollbackSynchronizer and refer to how that is integrated into the overall rollback process. I don't exactly follow what's the motivation behind the logs on the first two screenshots, but they don't have much bearing on input prediction - the logs are not on the same level where the input checks are made.

I cannot get the above to ever print with 3 players and 200ms delay.

That is the expected behavior, since there's no input prediction.
Let's say you're on tick 100 and an input arrives for tick 97. Tick 97 is simulated, then 98, 99, and 100 are not, since we don't have an input for it. On tick 101, input for tick 98 arrives. Tick 98 is simulated, then 99, 100, and 101 is not since we don't have input for it. So no ticks are simulated twice in rollback.

The rollback only happens for the latest NetworkTime.tick because of this line

False. Please read carefully how the rollback loop is setup, in its entirety, in NetworkRollback's code and its corresponding documentation.

Let's say a client changes input at tick 99, and this input arrives to the server at tick 102. The server does replace its _inputs[] but it doesn't rollback to tick 99 up to 102. It rolls back to 101 (see after_loop function above) if not just proceeds with 102.

False. Again, please read the documentation and related code on how rollback is handled.

And by extension, the server will rollback many ticks per frame because there is no input delay, which is not the case currently.

Given your example, if inputs take 3 ticks to arrive, the server will rollback 3 ticks per tick loop ( not frame ), and simulate only the first for the player, as that's the only one the server has input for.

So the state submission must be moved to after_loop in order to send only the latest state.

False. Please see above why only a single state is submitted as a new input arrives.

I just want to understand how input prediction works in netfox

Again, there is no input prediction in netfox.

I feel something is fundamentally wrong

I suggest you familiarize yourself with the codebase and the documentation.

Look, I've spent more than an hour reading this through, making sure I don't miss anything, even asked for help to get an extra perspective, and, from my point of view, this is a train of thought based on multiple misunderstandings about network rollback stemming from ( assuming ) not reading critical parts of the code. There is no actual issue I can fix or act upon.
I'm happy to help with questions, issues, bugs, or even helping with debugging user projects, but so far this issue is just being unfamiliar with how netfox works, despite a whole documentation site, comments in code, and a Discord server for quick questions, and multiple discussions on how rollback works.
Anyway, let me know if you have any specific questions!

Thank you for the answer. The input prediction clarification specifically helped (I opened https://github.com/foxssake/netfox/issues/299 for a question I have on that)
To completely clear my confusion and the confusion I caused on you, and because I have to pack my stuff for a long drive in a few hours, I will ask only critical questions:

That is the expected behavior, since there's no input prediction.
Let's say you're on tick 100 and an input arrives for tick 97. Tick 97 is simulated, then 98, 99, and 100 are not, since we don't have an input for it. On tick 101, input for tick 98 arrives. Tick 98 is simulated, then 99, 100, and 101 is not since we don't have input for it. So no ticks are simulated twice in rollback.

The above is for the non-input authority. I also confirmed this via debugging.
When we are at tick 100 with the input authority, our avatar is at tick 100 input and state, instead of tick 97's? If yes, this means our avatar is at 100 while the other avatars (which we are not input authority) are at tick 97, correct?
The above example, whatever the answer, must be included in the documentation

And by extension, the server will rollback many ticks per frame because there is no input delay, which is not the case currently.
Given your example, if inputs take 3 ticks to arrive, the server will rollback 3 ticks per tick loop ( not frame ), and simulate only the first for the player, as that's the only one the server has input for.

Could you elaborate on this?  Specifically this

and simulate only the first for the player

Doing a rushed debugging on this use-case, by adding the following code at the end of RollbackSynchronizer.submit_input()
if (multiplayer.is_server() && root.player_id != 1):
		_logger.info("Received input at tick: %s" % tick)
``` and the following code inside `BrawlerController._rollback_tick()`
```gdscript
if (multiplayer.is_server() && player_id != 1):
		_logger.info("This tick is: %s" % tick)

and with 200 ms delay, there is only 1 rollback tick per loop - it works as expected from what you wrote.
E.g. at tick 214, the server receives input of tick 205, and at tick 215, runs _rollback_tick(205) and receives input of tick 206. At tick 216, the server runs _rollback_tick(206)
I will debug this when home to confirm if currently the server can run 3 rollback ticks per loop. because in theory it should work, but haven't tested it. I assume it runs 3 rollback ticks per loop if 3 inputs are missing in a row

When we are at tick 100 with the input authority, our avatar is at tick 100 input and state, instead of tick 97's? If yes, this means our avatar is at 100 while the other avatars (which we are not input authority) are at tick 97, correct?

Correct. For the local avatar, we have the input for all ticks, the state from the server for ticks up to 97, and we can predict 98, 99, and 100, so state 100 is visible. For the other players' avatars, we can only rely on state, which as only arrived up to tick 97.

The above example, whatever the answer, must be included in the documentation

I reserve the right to judge what must or must not be done for this repo :slightly_smiling_face: I agree nonetheless. My point is, I invite you to ask / propose / suggest things to do, instead of declaring them as must-do's.

Could you elaborate on this? Specifically this

and simulate only the first for the player
first rollback tick loop? The earlier or the latest?

Staying with the example, we're about to run tick 100 in the network tick loop on the server, and we've received input for tick 97. During the network tick loop for tick 100, the rollback tick loop will simulate ticks 97, 98, 99, and 100. The player will be simulated only for tick 97, since that's the only tick the server has input for. Input for ticks 98, 99 and 100 have not arrived yet.

I assume it runs 3 rollback ticks per loop if 3 inputs are missing in a row, which would also submit 3 state RPCs.

If the server suddenly receives 3 tick's worth of inputs at once, then yes, this can happen.

Thank you for the clarity, I understand better now. Closing this issue because as you said its not really an issue but a misunderstanding from my part because I thought this was a bug.


Document per-replica zone configs

Fixes #2296
This may not be enough explanation, so please let me know what you think!

This change is

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/0e27e565e31da558bff825fe009c64429cb6be6c/

Thank you, @a-robinson! I'll get to this soon.

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/05d5298c59f362d803b1a192766880c045ad5ccd/

Sure, go ahead and take it over. Thanks for the feedback!

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/852fb9fedf5b13bb0cddd404b645abe6cf437859/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/5b6380289737c97664af688d0102e5bc26cbbd8b/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/1681383c1682d23985229a1c965c68878f1d26ed/


Type checker fails when calling a function with an Optional<() -> Void> ternary expression as a parameter

Description
No response
Reproduction
When compiling the following, the compiler fails with the error Type of expression is ambiguous without a type annotation
func takingAnOptionalClosure(closure: (() -> Void)?) {}
func someFunc() {}
func someOtherFunc() {
    let a = false ? someFunc : nil  // Fine
    takingAnOptionalClosure(closure: a)   // Fine
    takingAnOptionalClosure(closure: false ? someFunc : nil)  // Error
}

The above issue also leads to another diagnostic when the function call is within a SwiftUI ViewBuilder.
import SwiftUI
extension View {
    public func takingAnOptionalClosure(closure: (() -> Void)?) -> some View {
        self
    }
}
struct SwiftUIExample: View {
    func aFunc() {}

    var body: some View {
        Text("Hi")
        .takingAnOptionalClosure(closure: false ? aFunc : nil)
    }
}

Here the compiler returns the error Failed to produce diagnostic for expression; please submit a bug report (https://swift.org/contributing/#reporting-bugs) on the line of var body
POC swift package:
POC.zip
Expected behavior
I expected the code to successfully compile without any warnings or errors
Environment
The issues mentioned above happens when compiling the attached POC in Xcode 16.1 (16B40), Xcode 16.2 (16C5031c), and with swift build from the terminal. The problem does not seem to occur when compiling with swiftc
Output of swiftc -version:

swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-<IP_ADDRESS>.9 clang-16<IP_ADDRESS>)
Target: x86_64-apple-macosx15.0

Additional information
The problem first occurred in a file similar to the SwiftUI example above, after a class containing the equivalent of someFunc had been annotated with @ MainActor

+1


Add demonstration gif/video to ahkpm.dev home page

Probably built using something like vhs

Done. https://ahkpm.dev/


Add a check for when the command is canceled by the program on Window…

Close #29509
Windows, unlike Linux, does not have signal-specified exit codes. Therefore, we should add a Windows-specific check for Windows. If we don't do this, the logs will always show a failed status, even though the command actually works correctly.
If you check the Go source code in exec_windows.go, you will see that it always returns exit code 1.

The exit code 1 does not exclusively signify a SIGNAL KILL; it can indicate any issue that occurs when a program fails.

Could the code be simplified to this?
if ctx.Err() == Deadline || ctx.Err() == Canceled {
    return ctx.Err()
}
return err

I think it should cover all cases.

If the command is killed by context, then use context error
Otherwise use command error

Could the code be simplified to this?
if ctx.Err() != nil {
    return ctx.Err()
}
return err

I think it should cover all cases.
* If the command is killed by context, then use context error

* Otherwise use command error

(I haven't carefully thought about this problem at the moment, just a brief idea)

this is hard to test , considering the context may be canceled anywhere by the parent, I can't be sure that the error always returns before the context is canceled. If not, the real error will be ignored.

Hmm, I think it's worth to do the change. According to the "Context" document:
	// If Done is not yet closed, Err returns nil.
	// If Done is closed, Err returns a non-nil error explaining why:
	// Canceled if the context was canceled
	// or DeadlineExceeded if the context's deadline passed.
	// After Err returns a non-nil error, successive calls to Err return the same error.
	Err() error

I think using ctx.Err() correctly would make code more correct. If you have worries about it .... I could do such "refactoring", if I am wrong I will follow it and propose related fixes. 😁


feat: improve set generation logic

#131  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @pevisscher and the rest of your teammates on  Graphite


Grants digest adjustments

Why is this issue important?
follow-up to #1222
Current State
na
Expected State

[ ] Left Align Federal Grant Finder string with logo
[ ] USDR Logo should click through to grant finder not USDR.org - should go to https://grants.usdigitalresponse.org/
[ ] Email "from" should say "USDR Federal Grant Finder" instead of grants-notifications
[ ] Email title should be changed to "New Grants Published for [Search Name]"
[ ] Email body text preview: "You have # new grants to review!"

Implementation Plan
The following functions need to be added...
Relevant Code Snippets
No response

@ClaireValdivia A few things I wanted to clarify on the expected state here:

Email title: Are we talking about the email subject? The thing that shows up here on the email? And we want this to read simply {{ search name }}, instead of right now reading New grants published for {{ search name }}? (Fwiw my instinct would be that you still want something more than just the search name, since people might have names that end up confusing out of context in their email inbox.)

Email body text preview: Here are we talking about preview text (aka hidden preheader text)? We don't have this set up in our emails yet, but it wouldn't be too difficult to add. Can you help me get precise about the text, though? Do we want {{ number of grants }} new grants, {{ title of first grant }}... (where the ... is literally what you want in the text, rather than indicating that we should include more titles after the first)?

Probably out of scope here, but wanted to mention that the "from name" and "preview text" features are new. If we wanted to start using these for other emails we send as well, that would be a relatively easy follow-up once this ticket introduces the basic functionality.

@jeffsmohan  thanks for these questions! I updated #1 in the description. confirming with caitlin for #2

@jeffsmohan just updated the issue - thanks again for these really helpful questions!

Apologies for the delayed comment here, but I must have missed testing this one fully. Just tested now and things are looking fine overall but @jeffsmohan I noticed that the "From" name is still showing as grants-notifications rather than "USDR Federal Grant Finder" - was that just forgotten in the PR? if so I can definitely make a new issue to address that if helpful

@ClaireValdivia Sorry, emails are tough to fully test before they get on staging! This change was included in the PR that got merged, so if it's not working, that's just a bug that needs fixing. Can you forward me an example email so I can examine the email headers, for a start?
Also, I noticed in looking back at this code that I maybe followed the spec more slavishly than was helpful. I implemented the from name on the grant digest emails only, but I assume we would actually want the same from name for all emails related to the Grant Finder tool, yes? (And while we're at it, it'd be easy to set "USDR Grants Reporter" or similar for all the ARPA emails, if we wanted. Is that what we'd want?)

@ClaireValdivia Thanks for catching this! Looks like our email infra is different between dev and staging/prod. So while this was working in dev when the original PR went out, it wasn't implemented for staging/prod.
I've just put up a new PR (https://github.com/usdigitalresponse/usdr-gost/pull/2940) for review that implements the from name for staging/prod, as well as implementing the from names we discussed for all outgoing emails.

@ClaireValdivia We've landed the PR fixing "from" name on emails! Once that's on staging, we should be sure to double-check it's working across all Grants and ARPA emails -- lmk if you'd like a hand with that

@jeffsmohan

Login - looks great for grant finder, but for ARPA users, it also says from USDR Federal Grant Finder. if it can only be one, let's change the login email to be from "USDR Grants"

Welcome - (same as login) - looks great for grant finder, but for ARPA users, it also says from USDR Federal Grant Finder. if it can only be one, let's change the login email to be from "USDR Grants"

Grant finder assignment email - looks great

Grant finder digest emails - will test tomorrow when my digests come in

ARPA Treasury Report - this is on me (I had a typo above!) - it current says "UDSR ARPA Reporter" and should say "USDR ARPA Reporter"

ARPA Audit Report - same as treasury report - UDSR should be changed to USDR

@ClaireValdivia the from name fixes are now on staging! Please let me know if you find anything else

This all looks great on staging, this is good to go tomorrow :) Thank you Jeff!!


BigDecimal <=> bug

puts 1<=>BigDecimal.new("-0.2") #=>2
puts BigDecimal.new("-0.2")<=>1 #=>-2
the result is weird, should be -1,1,0 like ruby

Hi! Check the docs on our Comparable: https://github.com/crystal-lang/crystal/blob/master/src/comparable.cr
The result is positive, negative or zero. The number doesn't matter because you use those numbers compared with zero. I don't think it matters that we don't return exactly the same values as Ruby.
Put another way: how does this affect you?


[Design system sync] Refactoring all colours to follow design system

Ticket URL: n/a
About these changes
This brings the majority of the build colours inline with the design system, ensuring we're being consistent going forward, and making it easier to use the correct colours.
How to check these changes
Where possible, provide guidance to help your reviewer
Before assigning to reviewer, please make sure you have

[ ] Checked things thoroughly before handing over to reviewer.
[ ] Checked PR title starts with ticket number as per project conventions to help us keep track of changes.
[ ] Ensured that PR includes only commits relevant to the ticket.
[ ] Waited for all CI jobs to pass before requesting a review.
[ ] Added/updated tests and documentation where relevant.

Merging PR guidance
Follow docs\developer-guide\contributing.md
Deployment guidance
Follow docs\infra\environments.md

Noticed a couple of display issues cropped up in search following colour changes:

Probably makes sense to fix these in this PR?

I've just fixed all of the above, looks like $color__grey-800 was used to replace some lighter example of colours and this has now been fixed.

I've just merged develop in and addressed the highlighted issues @janehughes, we should be good to go


Convert rtl_433 .ook files to Flipper .sub

Hello. Is there a way to convert the .ook files produced by rtl_433 to the Flipper .sub format?
Thank you!

it's possible although .ook files does store the RF freq (center_frequency) when reading from saved data.
I'll throw something together as a test.

@strasharo
take a look at ook_to_sub.py in the dev branch) it still needs clean up and testing but should work
Note that you will have to specify the frequency when converting  .ook files


Solarized Dark Theme token colours changed

Type: Bug
After updating my VS Code, I noticed that the foreground colour of Python's builtin constants like 'None' and 'True' are being overridden by the semantic analyzer and it set them as variables instead of constants.
I have tried to edit the TextMate but from what I've found the semantic analyzer token colour takes precedence.
This was not the case before I updated my VS Code.
 Maybe a different semantic are generated?
Here's what I see in the latest insiders when I use the Developer: Inspect Editor Tokens and Scopes command:

All looks fine here. What do you get when using that command?

This is what I got:

I tried to edit the textmate all to no avail. Just like you said and as it is in the docs, semantic analyzer takes precedence.

What is baffling to me is how I didn't experience this until some days ago when I was trying different Color Themes and after my VS Code updated.

Maybe the Python language server added these semantic tokens only recently, I don't know.
There's also a way to change the color for semantic tokens.
	"editor.semanticTokenColorCustomizations": {
		"[Solarized Dark]": {
			"rules": {
				"builtinConstant": "#ff0000"
			}
		}
	}

Closing issue. I think the Python extension had some issues regarding semantic tokens


examine optimizations for projection

Based on new benchmarks, projection is unnecessarily expensive. Projection on 1000 tuples take 50 seconds, which is really excessive. Profiling reveals that duplicate tuple detection (tuple hashing) is the cause.
Some potential optimizations are:

elimination of deduplication on projection on key attributes - if the attributes passed in cover a candidate key, then no deduplication (hashing) is required
replacing relFold + union with something targeting tuples instead of relations
deferring deduplication until the projection is complete
bloom filters for the hash values as a first pass

Are there some other ideas?

Union, which is used by projection, is probably also unnecessarily expensive.


How to stop listening and resuming listening for event X when using different objects?

That's a tricky questions I am stuck with in my app. Let me get straight to the example:
        objectA.listenTo(submitButtonField, 'click:field', function(e) {
            // code here still gets executed but I don't want to
        })

        objectB.listenTo(submitButtonField, 'click:field', function(e) {
            objectB.stopListening(submitButtonField, 'click:field')
        })

You see, I have two different objects (in my app in different controllers/namespaces) but both having the same reference to the same button field and both listening to the click event.
Object B does stop listening and I want this to stop object A from listening to these click event as well. But no, object A still listens to them.
Any trick how I can do this? To tell everyone to stop to listen? (also will need the capability to resume listening for all objects)

Also, would be cool to have something like e.preventDefault() to stop propagating the event to other objects.

Unfortunately there's no way to selectively ignore events in Backbone. You can try passing a "flag" in one of your arguments to tell the event listener to selectively ignore an event, or use a "proxy" object to do bookkeeping between your listeners.
Keep in mind also that event listeners are called in the order they were bound. So your objectA listener will always be called before your objectB listener.

@akre54 ugh, this makes it very difficult to have a plugin for example run some code before submission within the backbone framework :/

Right, but Backbone events don't bubble in the same way DOM events do so there's less of a need to "stop propagation". Even there, binding order matters.
What did you have in mind for a submission plugin? I think setting up your own control flow for submitting is much easier to manage and reason about than opaquely trying to manage which events are called and when.

right, that i know - i think someone else helped me and came with a good solution, see https://github.com/wpninjas/ninja-forms/issues/1633 ... but thanks anway for your assistance so far


Extended authentication handler is not yet supported

Describe the bug
I'm encountering an issue while attempting to connect to AWS IoT Core from my C# Web API in .NET 7.0. Interestingly, the same setup was functioning perfectly a few days ago. I'm using MQTTnet package version <IP_ADDRESS>1. The error message I'm now receiving is as follows:
MQTTnet.Adapter.MqttConnectingFailedException: 'Error while authenticating. Extended authentication handler is not yet supported'
Which component is your bug related to?

Client

Expected behavior
It should successfully connect to AWS IoT MQTT broker.
Screenshots
If applicable, add screenshots to help explain your problem.
string certPem = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Certificates/Users_Thing.cert.pem");
string keyPem = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Certificates/Users_Thing.private.key");

var pfxCert = new X509Certificate2(X509Certificate2.CreateFromPemFile(certPem, keyPem).Export(X509ContentType.Pfx));
                var factory = new MqttFactory();
                var mqttClient = factory.CreateMqttClient();
                var options = new MqttClientOptionsBuilder()
                        .WithTcpServer(IotEndpoint, BrokerPort)
                        .WithClientId(ClientId)
                        .WithCleanSession()
                        //.WithCommunicationTimeout(TimeSpan.FromSeconds(60))
                        .WithTls(new MqttClientOptionsBuilderTlsParameters
                        {
                            UseTls = true,
                            SslProtocol = System.Security.Authentication.SslProtocols.Tls12,
                            IgnoreCertificateRevocationErrors = true,
                            IgnoreCertificateChainErrors = true,
                            AllowUntrustedCertificates = true,
                            Certificates = new List<X509Certificate>
                            {
                                pfxCert
                            }
                        })
                        .Build();

                await mqttClient.ConnectAsync(options, CancellationToken.None);

I am getting same exception. Seems related to https://github.com/dotnet/MQTTnet/issues/1139 ?

We are facing the same issue connecting to emqx. I'm under the impression that it worked flawlessly some releases ago.
This exception is thrown quite often but it eventually connects (my library retries to establish the connection).
MQTTnet.Adapter.MqttConnectingFailedException: Error while authenticating. Extended authentication handler is not yet supported
 ---> System.NotSupportedException: Extended authentication handler is not yet supported
   at MQTTnet.Client.MqttClient.Authenticate(IMqttChannelAdapter channelAdapter, MqttClientOptions options, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at MQTTnet.Client.MqttClient.Authenticate(IMqttChannelAdapter channelAdapter, MqttClientOptions options, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.ConnectInternal(IMqttChannelAdapter channelAdapter, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.ConnectAsync(MqttClientOptions options, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.ConnectAsync(MqttClientOptions options, CancellationToken cancellationToken)
   at Silverback.Messaging.Broker.Mqtt.MqttClientWrapper.TryConnectClientAsync(Boolean isFirstTry, CancellationToken cancellationToken)

Half a second after the exception above, it successfully connected. I'm quite confident that nothing changes in the settings between the retries.

Have you got any solution?

Yes, this issue has been resolved now. To resolve the IoT connectivity problem, I followed these steps:

Create a new certificate in the AWS IoT Core console.
Download the certificate and key files.
Replace the content of the private key and certificate PEM files in the Web API project.
After performing these steps, the connection was successfully established, and we are now able to send and receive messages from IoT once again.

Yes, this issue has been resolved now. To resolve the IoT connectivity problem, I followed these steps:

Create a new certificate in the AWS IoT Core console.
Download the certificate and key files.
Replace the content of the private key and certificate PEM files in the Web API project.
After performing these steps, the connection was successfully established, and we are now able to send and receive messages from IoT once again.

Thank you so much for the response. I will try the way you have suggested.


Does not expand file path

I am not sure if its just me but :e % does not expand % into the file path. This extends to something like :e %:h.

It doesn't work for me either, if cmdline file path completion is enabled, e %<TAB> expands to %_file_path_ , which makes it not very useful as user needs to manually remove the % sign. Tab completion of e %:h plainly does not work

Is there a way to have the suggestions only include files once we type :e ?  I might have a limited imagination, but I can't think of any other source for the autocomplete once it's clear we intend to open a file. Right?

@EdmundsEcho
Try cmp-fuzzy-path


Update docs to reflect a custom object can be used as title.

While Sanfora supports using custom objects as a title, this is not a documented feature.
This change adds those details to the docs.

Thanks! @elg0nz